diff options
author | MarcoFalke <falke.marco@gmail.com> | 2017-08-16 02:09:10 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-08-16 02:09:49 +0200 |
commit | b6a48914c50631914192aa11b19205436a9c664d (patch) | |
tree | 748ac6a80402b05e58f249bca71de2cb6a626ee8 /src/test | |
parent | 7db65c363a0cc6ca7cdb04de9a973ab70013baad (diff) | |
parent | 6e8c48dc593d8b6e5cebd15a980074715223b572 (diff) |
Merge #9964: Add const to methods that do not modify the object for which it is called
6e8c48dc5 Add const to methods that do not modify the object for which it is called (practicalswift)
Pull request description:
Tree-SHA512: a6888111ba16fb796e320e60806e1a77d36f545989b5405dc7319992291800109eab0b8e8c286b784778f41f1ff5289e7cb6b4afd7aec77f385fbcafc02cffc1
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/coins_tests.cpp | 4 | ||||
-rw-r--r-- | src/test/prevector_tests.cpp | 4 | ||||
-rw-r--r-- | src/test/script_tests.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp index 99d0277b7c..37ddf83f5e 100644 --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -89,8 +89,8 @@ public: BOOST_CHECK_EQUAL(DynamicMemoryUsage(), ret); } - CCoinsMap& map() { return cacheCoins; } - size_t& usage() { return cachedCoinsUsage; } + CCoinsMap& map() const { return cacheCoins; } + size_t& usage() const { return cachedCoinsUsage; } }; } // namespace diff --git a/src/test/prevector_tests.cpp b/src/test/prevector_tests.cpp index 345c4a2148..841282873f 100644 --- a/src/test/prevector_tests.cpp +++ b/src/test/prevector_tests.cpp @@ -152,11 +152,11 @@ public: pre_vector.assign(n, value); } - Size size() { + Size size() const { return real_vector.size(); } - Size capacity() { + Size capacity() const { return pre_vector.capacity(); } diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 06b8274f2d..17374edcc4 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -450,7 +450,7 @@ public: return array; } - std::string GetComment() + std::string GetComment() const { return comment; } |