aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/misc/Event.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-12-23 19:26:05 +0100
committer hop311 <hop3114@gmail.com>2023-12-23 19:26:05 +0100
commit8a33982e543b7fb8c09be90ebadb33fe7f99b52f (patch)
tree0fb82e22b383996606ef6adc3e92c42d85bc6777 /src/openvic-simulation/misc/Event.hpp
parent14e47d58b85f657ec1fed8abf88219f09bd3efbb (diff)
Fixed TGC compatibility + misc cleanup
Diffstat (limited to 'src/openvic-simulation/misc/Event.hpp')
-rw-r--r--src/openvic-simulation/misc/Event.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/openvic-simulation/misc/Event.hpp b/src/openvic-simulation/misc/Event.hpp
index a518f78..71957c4 100644
--- a/src/openvic-simulation/misc/Event.hpp
+++ b/src/openvic-simulation/misc/Event.hpp
@@ -65,13 +65,14 @@ namespace OpenVic {
struct OnAction : HasIdentifier {
friend struct EventManager;
- using weight_map_t = std::map<Event const*, uint64_t>;
+
+ using weight_map_t = std::map<Event const*, uint64_t>;
private:
weight_map_t PROPERTY(weighted_events);
- OnAction(std::string_view new_identifier, weight_map_t new_weighted_events);
-
+ OnAction(std::string_view new_identifier, weight_map_t&& new_weighted_events);
+
public:
OnAction(OnAction&&) = default;
};
@@ -90,7 +91,7 @@ namespace OpenVic {
std::vector<Event::EventOption>&& options
);
- bool add_on_action(std::string_view identifier, OnAction::weight_map_t new_weighted_events);
+ bool add_on_action(std::string_view identifier, OnAction::weight_map_t&& new_weighted_events);
bool load_event_file(IssueManager const& issue_manager, ast::NodeCPtr root);
bool load_on_action_file(ast::NodeCPtr root);