]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Remove iterators from BBLShift to remove a spurious(?) warning when running in g...
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Mon, 10 May 2010 02:37:05 +0000 (02:37 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Mon, 10 May 2010 02:37:05 +0000 (02:37 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@754 e59a4935-1847-0410-ae03-e826735625c1

src/to-sat/BitBlastNew.cpp

index 3ffa256fa47fc5ad2cd02caf4f9c929bb2dcfaf5..3a60152f7298ae9cf76959e33881efbbe2f38545 100644 (file)
@@ -739,13 +739,12 @@ ASTNode BitBlasterNew::BBBVLE(const BBNodeVec& left, const BBNodeVec& right,
 void BitBlasterNew::BBLShift(BBNodeVec& x, unsigned int shift) {
        // left shift x (destructively) within width.
        // loop backwards so that copy to self works correctly. (DON'T use STL insert!)
-       const BBNodeVec::iterator xbeg = x.begin();
-       BBNodeVec::iterator xit = x.end() - 1;
-       for (; xit >= xbeg; xit--) {
-               if (xit - shift >= xbeg)
-                       *xit = *(xit - shift);
+       for (int i =((int)x.size())-1; i >=0; i--)
+       {
+               if (i-(int)shift >= 0)
+                       x[i] = x[i-(int)shift];
                else
-                       *xit = nf->getFalse(); // new LSB is zero.
+                       x[i] = nf->getFalse(); // new LSB is zero.
        }
 }