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
This commit is contained in:
MarcoFalke
2017-08-16 02:09:10 +02:00
23 changed files with 38 additions and 38 deletions

View File

@@ -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

View File

@@ -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();
}

View File

@@ -450,7 +450,7 @@ public:
return array;
}
std::string GetComment()
std::string GetComment() const
{
return comment;
}