summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-02-24 11:30:22 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-02-24 11:30:38 +0100
commitdf5291d097abce338870864efd9af6591a2f69d2 (patch)
treeaf5346e2f1c2e6926af90ca4cbc0bbac0bdc63b0 /editor
parente1b1538362d58145e8fcdf68537bcf9fa798f58b (diff)
editor/inspect: move out of arg passed by value
Diffstat (limited to 'editor')
-rw-r--r--editor/inspect.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/inspect.hpp b/editor/inspect.hpp
index 7edfd6d1..a6da98b7 100644
--- a/editor/inspect.hpp
+++ b/editor/inspect.hpp
@@ -7,9 +7,9 @@ struct erased_accessor;
template<typename T, typename Enum, Enum As>
struct field_repr_ final {
- field_repr_(T x) : value{x} {}
+ field_repr_(T x) : value{std::move(x)} {}
field_repr_(const field_repr_<T, Enum, As>& other) noexcept = default;
- field_repr_& operator=(T x) noexcept { value = x; return *this; }
+ field_repr_& operator=(T x) noexcept { value = std::move(x); return *this; }
field_repr_& operator=(const field_repr_<T, Enum, As>& x) noexcept = default;
field_repr_& operator*() const noexcept { return value; }
operator T() const noexcept { return value; }