From 19fee1561a6b7848c4eeba1fd30154efe763d06f Mon Sep 17 00:00:00 2001 From: Sergey Podobry Date: Wed, 24 Dec 2025 19:02:21 +0200 Subject: [PATCH] Mark move operators noexcept, remove unused code --- include/kf/GenericTableAvl.h | 8 ++------ include/kf/TreeMap.h | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/include/kf/GenericTableAvl.h b/include/kf/GenericTableAvl.h index f70a08e..112a0b0 100644 --- a/include/kf/GenericTableAvl.h +++ b/include/kf/GenericTableAvl.h @@ -20,7 +20,7 @@ namespace kf init(); } - GenericTableAvl(_Inout_ GenericTableAvl&& another) + GenericTableAvl(_Inout_ GenericTableAvl&& another) noexcept { moveInit(another); } @@ -105,7 +105,7 @@ namespace kf } } - GenericTableAvl& operator=(_Inout_ GenericTableAvl&& another) + GenericTableAvl& operator=(_Inout_ GenericTableAvl&& another) noexcept { if (this != &another) { @@ -119,7 +119,6 @@ namespace kf private: void init() { -#pragma warning(suppress: 28023) // missing _Function_class_ annotation ::RtlInitializeGenericTableAvl(&m_table, &compareRoutine, &allocateRoutine, &freeRoutine, this); } @@ -187,9 +186,6 @@ namespace kf } } - private: - enum { PoolTag = '++TG' }; - private: RTL_AVL_TABLE m_table; }; diff --git a/include/kf/TreeMap.h b/include/kf/TreeMap.h index 0dc557e..a9ce5d0 100644 --- a/include/kf/TreeMap.h +++ b/include/kf/TreeMap.h @@ -16,7 +16,7 @@ namespace kf { } - TreeMap(_Inout_ TreeMap&& another) : m_table(std::move(another.m_table)) + TreeMap(_Inout_ TreeMap&& another) noexcept : m_table(std::move(another.m_table)) { } @@ -109,7 +109,7 @@ namespace kf return m_table.deleteElement(*node); } - TreeMap& operator=(_Inout_ TreeMap&& another) + TreeMap& operator=(_Inout_ TreeMap&& another) noexcept { m_table = std::move(another.m_table); return *this; @@ -131,7 +131,7 @@ namespace kf { } - Node(Node&& another) : m_key(std::move(another.m_key)), m_value(std::move(another.m_value)) + Node(Node&& another) noexcept : m_key(std::move(another.m_key)), m_value(std::move(another.m_value)) { }