aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-06-05 12:17:40 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-06-09 13:23:20 -0700
commite241a63c23239adf54fe69baf02f3159222b71e4 (patch)
tree71f0784ba648f1c0d2e7ab73df7c1de9c776c02e /src/script
parent400fdd08cc95f1e85afafd07ddd9c0bed11483ea (diff)
Clarify prevector::erase and avoid swap-to-clear
Diffstat (limited to 'src/script')
-rw-r--r--src/script/script.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/script/script.h b/src/script/script.h
index 95a5999a13..5f88e71012 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -642,8 +642,9 @@ public:
void clear()
{
- // The default std::vector::clear() does not release memory.
- CScriptBase().swap(*this);
+ // The default prevector::clear() does not release memory
+ CScriptBase::clear();
+ shrink_to_fit();
}
};