diff --git a/Hashmap.h b/Hashmap.h index 5aaf0f4..c7ba93a 100644 --- a/Hashmap.h +++ b/Hashmap.h @@ -33,7 +33,7 @@ namespace LouiEriksson { /// /// - /// Version 1.0.0 + /// Version 1.0.1 /// /// Custom Hashmap implementation accepting a customisable key and value type. Created using a combination of prior knowledge and brief online tutorial. /// This implementation requires that your "key" type is compatible with std::hash and that the stored data types are copyable. @@ -109,10 +109,7 @@ namespace LouiEriksson { /// Initialise Hashmap. /// /// Initial capacity of the Hashmap. Must be larger than 0. - Hashmap(const size_t& _capacity = 1) { - - m_Size = 0; - + Hashmap(const size_t& _capacity = 1) : m_Size(0) { m_Buckets.resize(_capacity); } @@ -135,7 +132,7 @@ namespace LouiEriksson { /// /// Key of the entry. /// True if successful, false otherwise. - bool ContainsKey(const Tk& _key) noexcept { + bool ContainsKey(const Tk& _key) const noexcept { auto result = false; diff --git a/README.md b/README.md index 9802851..a77b3a3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# C++ Hashmap (1.0.0) +# C++ Hashmap (1.0.1) ## Table of Contents