From 37596c50cfdf9ba7b6b2a6ba5d27b0629e5c3750 Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Thu, 6 Apr 2017 08:37:05 +1000 Subject: [PATCH] bytecode_ptr: avoid shadowing size() --- src/util/bytecode_ptr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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. */