mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-07-12 13:34:45 +03:00
bytecode_ptr: avoid shadowing size()
This commit is contained in:
parent
d4146059db
commit
37596c50cf
@ -106,12 +106,12 @@ public:
|
|||||||
* does not reallocate and copy, it just changes the value returned by
|
* does not reallocate and copy, it just changes the value returned by
|
||||||
* size().
|
* size().
|
||||||
*/
|
*/
|
||||||
void shrink(size_t size) {
|
void shrink(size_t new_size) {
|
||||||
if (size > bytes) {
|
if (new_size > bytes) {
|
||||||
assert(0);
|
assert(0);
|
||||||
throw std::logic_error("Must shrink to a smaller value");
|
throw std::logic_error("Must shrink to a smaller value");
|
||||||
}
|
}
|
||||||
bytes = size;
|
bytes = new_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief Returns size of the memory region in bytes. */
|
/** \brief Returns size of the memory region in bytes. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user