From ef848d6876e86304864453e35b826f1d13389fe5 Mon Sep 17 00:00:00 2001 From: hashlag Date: Sun, 18 Oct 2026 00:35:41 +0300 Subject: [PATCH] Add move ctor for SeArray. --- Chaos/Service/SeArray.hpp | 2 +- ChaosTests/Service/SeArrayTests.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Chaos/Service/SeArray.hpp b/Chaos/Service/SeArray.hpp index 9001451..427dcf7 100644 --- a/Chaos/Service/SeArray.hpp +++ b/Chaos/Service/SeArray.hpp @@ -18,7 +18,7 @@ public: } SeArray(const SeArray & other) = delete; - SeArray(SeArray && other) = delete; + SeArray(SeArray && other) = default; SeArray & operator=(const SeArray & other) = default; SeArray & operator=(SeArray && other) = default; diff --git a/ChaosTests/Service/SeArrayTests.cpp b/ChaosTests/Service/SeArrayTests.cpp index cf00e92..4a09120 100644 --- a/ChaosTests/Service/SeArrayTests.cpp +++ b/ChaosTests/Service/SeArrayTests.cpp @@ -326,3 +326,16 @@ TEST(SeArrayTests, MoveAssignTest) ASSERT_EQ(0, arr1[4]); } } + +TEST(SeArrayTests, MoveConstructTest) +{ + { + SeArray arr1; + arr1[0] = 0x11; + arr1[1] = 0x22; + + SeArray arr2(std::move(arr1)); + ASSERT_EQ(0x11, arr2[0]); + ASSERT_EQ(0x22, arr2[1]); + } +}