]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
bytecode_ptr: avoid shadowing size()
authorJustin Viiret <justin.viiret@intel.com>
Wed, 5 Apr 2017 22:37:05 +0000 (08:37 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 26 Apr 2017 05:19:43 +0000 (15:19 +1000)
src/util/bytecode_ptr.h

index 15d3e2fe5371f8763b290cc2d95cc2e95857cbe7..a9a4b704ba06f379e49ae4f14f395bad85529ecd 100644 (file)
@@ -106,12 +106,12 @@ public:
      * does not reallocate and copy, it just changes the value returned by
      * size().
      */
-    void shrink(size_t size) {
-        if (size > bytes) {
+    void shrink(size_t new_size) {
+        if (new_size > bytes) {
             assert(0);
             throw std::logic_error("Must shrink to a smaller value");
         }
-        bytes = size;
+        bytes = new_size;
     }
 
     /** \brief Returns size of the memory region in bytes. */