Mark IKeyValueContainer::getElementBytes constexpr

This commit is contained in:
sfc-gh-tclinkenbeard 2020-06-17 18:08:43 -07:00
parent d32e97e4c4
commit 7a28ace7eb
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ public:
uint64_t sumTo(const_iterator to) const { return data.sumTo(to); }
uint64_t sumTo(iterator to) const { return data.sumTo(const_iterator{ to }); }
static int getElementBytes() { return IndexedSet<KeyValueMapPair, uint64_t>::getElementBytes(); }
static constexpr int getElementBytes() { return IndexedSet<KeyValueMapPair, uint64_t>::getElementBytes(); }
private:
IKeyValueContainer(IKeyValueContainer const&); // unimplemented

View File

@ -298,7 +298,7 @@ public:
}
// Return the amount of memory used by an entry in the IndexedSet
static int getElementBytes() { return sizeof(Node); }
constexpr static int getElementBytes() { return sizeof(Node); }
private:
// Copy operations unimplemented. SOMEDAY: Implement and make public.