diff options
| author | practicalswift <[email protected]> | 2017-03-09 13:34:54 +0100 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2017-07-25 13:46:52 +0200 |
| commit | 6e8c48dc593d8b6e5cebd15a980074715223b572 (patch) | |
| tree | 7977c539a2e3a2d344d156fc53fde9848dc84ca1 /src/test | |
| parent | Merge #10865: Move CloseSocket out of SetSocketNonBlocking and pass socket as... (diff) | |
| download | discoin-6e8c48dc593d8b6e5cebd15a980074715223b572.tar.xz discoin-6e8c48dc593d8b6e5cebd15a980074715223b572.zip | |
Add const to methods that do not modify the object for which it is called
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 e24431528..85f268ecd 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 345c4a214..841282873 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 a18471588..42d947470 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; } |