aboutsummaryrefslogtreecommitdiff
path: root/src/any_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/any_map.h')
-rw-r--r--src/any_map.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/any_map.h b/src/any_map.h
index 2dee75a6..ea6044b1 100644
--- a/src/any_map.h
+++ b/src/any_map.h
@@ -67,10 +67,10 @@ namespace cru
// Set the value of key, and trigger all related listeners.
template <typename T>
- void SetValue(const String& key, const T& value)
+ void SetValue(const String& key, T&& value)
{
auto& p = map_[key];
- p.first = std::make_any<T>(value);
+ p.first = std::make_any<T>(std::forward<T>(value));
InvokeListeners(p.second, p.first);
}