Skip to content

Commit 1d2a145

Browse files
author
Ubuntu
committed
Version 1.0.4
1 parent 51c058c commit 1d2a145

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Hashmap.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace LouiEriksson {
3434

3535
/// <summary>
3636
/// <para>
37-
/// Version 1.0.3
37+
/// Version 1.0.4
3838
/// </para>
3939
/// Custom Hashmap implementation accepting a customisable key and value type. Created using a combination of prior knowledge and brief online tutorial.
4040
/// <para><remarks>This implementation requires that your "key" type is compatible with std::hash and that the stored data types are copyable.</remarks></para>
@@ -59,6 +59,7 @@ namespace LouiEriksson {
5959
KeyValuePair(const KeyValuePair& other) noexcept :
6060
first(other.first),
6161
second(other.second) {}
62+
6263
};
6364

6465
private:
@@ -110,7 +111,9 @@ namespace LouiEriksson {
110111
/// Initialise Hashmap.
111112
/// </summary>
112113
/// <param name="_capacity">Initial capacity of the Hashmap. Must be larger than 0.</param>
113-
Hashmap(const size_t& _capacity = 1) : m_Size(0) {
114+
Hashmap(const size_t& _capacity = 1) :
115+
m_Size(0)
116+
{
114117
m_Buckets.resize(_capacity);
115118
}
116119

@@ -409,6 +412,7 @@ namespace LouiEriksson {
409412
m_Buckets.clear();
410413
m_Buckets.resize(1);
411414
}
415+
412416
};
413417

414418
} // LouiEriksson

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ This header is used for [std::vector](https://en.cppreference.com/w/cpp/containe
6666

6767
### References
6868

69-
- Wang, Q. (Harry) (2020). Implementing Your Own HashMap (Explanation + Code). YouTube. Available at: https://www.youtube.com/watch?v=_Q-eNqTOxlE [Accessed 2021].
69+
- Wang, Q. (Harry) (2020). Implementing Your Own HashMap (Explanation + Code). YouTube. Available at: https://www.youtube.com/watch?v=_Q-eNqTOxlE [Accessed 2021].

0 commit comments

Comments
 (0)