From: Justin Viiret Date: Wed, 5 Apr 2017 22:37:05 +0000 (+1000) Subject: bytecode_ptr: avoid shadowing size() X-Git-Tag: v4.5.0^2~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37596c50cfdf9ba7b6b2a6ba5d27b0629e5c3750;p=thirdparty%2Fvectorscan.git bytecode_ptr: avoid shadowing size() --- diff --git a/src/util/bytecode_ptr.h b/src/util/bytecode_ptr.h index 15d3e2fe..a9a4b704 100644 --- a/src/util/bytecode_ptr.h +++ b/src/util/bytecode_ptr.h @@ -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. */