Skip to content

Commit fac63ec

Browse files
Mark move operators noexcept, remove unused code (#92)
1 parent d363481 commit fac63ec

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

include/kf/GenericTableAvl.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace kf
2020
init();
2121
}
2222

23-
GenericTableAvl(_Inout_ GenericTableAvl&& another)
23+
GenericTableAvl(_Inout_ GenericTableAvl&& another) noexcept
2424
{
2525
moveInit(another);
2626
}
@@ -105,7 +105,7 @@ namespace kf
105105
}
106106
}
107107

108-
GenericTableAvl& operator=(_Inout_ GenericTableAvl&& another)
108+
GenericTableAvl& operator=(_Inout_ GenericTableAvl&& another) noexcept
109109
{
110110
if (this != &another)
111111
{
@@ -119,7 +119,6 @@ namespace kf
119119
private:
120120
void init()
121121
{
122-
#pragma warning(suppress: 28023) // missing _Function_class_ annotation
123122
::RtlInitializeGenericTableAvl(&m_table, &compareRoutine, &allocateRoutine, &freeRoutine, this);
124123
}
125124

@@ -187,9 +186,6 @@ namespace kf
187186
}
188187
}
189188

190-
private:
191-
enum { PoolTag = '++TG' };
192-
193189
private:
194190
RTL_AVL_TABLE m_table;
195191
};

include/kf/TreeMap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace kf
1616
{
1717
}
1818

19-
TreeMap(_Inout_ TreeMap&& another) : m_table(std::move(another.m_table))
19+
TreeMap(_Inout_ TreeMap&& another) noexcept : m_table(std::move(another.m_table))
2020
{
2121
}
2222

@@ -109,7 +109,7 @@ namespace kf
109109
return m_table.deleteElement(*node);
110110
}
111111

112-
TreeMap& operator=(_Inout_ TreeMap&& another)
112+
TreeMap& operator=(_Inout_ TreeMap&& another) noexcept
113113
{
114114
m_table = std::move(another.m_table);
115115
return *this;
@@ -131,7 +131,7 @@ namespace kf
131131
{
132132
}
133133

134-
Node(Node&& another) : m_key(std::move(another.m_key)), m_value(std::move(another.m_value))
134+
Node(Node&& another) noexcept : m_key(std::move(another.m_key)), m_value(std::move(another.m_value))
135135
{
136136
}
137137

0 commit comments

Comments
 (0)