diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-06 10:08:53 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-06 10:08:53 +0300 |
commit | 572c48cf98601c66eebec27bb40cfc7e05ea341c (patch) | |
tree | ff2c056d119a6af0fae7c4d5cdef674eb969f0ae /tests/gtests/functions | |
parent | 703a73fa846531a0888c8f99489c8e213f5c5d81 (diff) |
BLI: improve exception safety of memory utils
Even if we do not use exception in many places in Blender, our core C++ library
should become exception safe. Otherwise, we don't even have the option
to work with exceptions if we decide to do so.
Diffstat (limited to 'tests/gtests/functions')
-rw-r--r-- | tests/gtests/functions/FN_cpp_type_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gtests/functions/FN_cpp_type_test.cc b/tests/gtests/functions/FN_cpp_type_test.cc index f6ae0877ed1..1297ca471b7 100644 --- a/tests/gtests/functions/FN_cpp_type_test.cc +++ b/tests/gtests/functions/FN_cpp_type_test.cc @@ -50,7 +50,7 @@ struct TestType { other.value = copy_constructed_from_value; } - TestType(TestType &&other) + TestType(TestType &&other) noexcept { value = move_constructed_value; other.value = move_constructed_from_value; @@ -63,7 +63,7 @@ struct TestType { return *this; } - TestType &operator=(TestType &&other) + TestType &operator=(TestType &&other) noexcept { value = move_assigned_value; other.value = move_assigned_from_value; |