From 2c41b643607f2f717824a035eafde5a89340fed5 Mon Sep 17 00:00:00 2001 From: Miguel Date: Thu, 9 Jan 2025 15:47:49 +0100 Subject: some cleanup --- test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test.cpp') diff --git a/test.cpp b/test.cpp index b987af9..cf2830c 100644 --- a/test.cpp +++ b/test.cpp @@ -8,7 +8,7 @@ class C1 { -public: +public: C1() : name{"default"} { std::cout << "C1 default cons: " << name << std::endl; @@ -31,11 +31,11 @@ public: std::cout << "C1 move constructor: " << name << std::endl; other.name+=" (moved away)"; } - + C1& operator=(C1&& other) { std::cout << "C1 move called: " << other.name << " -> " << name << std::endl; name = other.name; - other.name+=" (moved away)"; + other.name+=" (moved away)"; return *this; } @@ -51,7 +51,7 @@ public: std::cout << "C1 says: " << name << std::endl; } -private: +private: std::string name; @@ -77,5 +77,5 @@ int main() { c.say(); return EXIT_SUCCESS; - + } -- cgit v1.2.3