aboutsummaryrefslogtreecommitdiff
path: root/extension/src/MapSingleton.hpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-04-09 01:17:58 +0200
committer Hop311 <hop3114@gmail.com>2023-04-09 01:17:58 +0200
commitc3034b0ecadeca4041796dc93d7080156f589fa2 (patch)
tree1bb59f42c6c33a991875fcb4595e9a38ab98ada7 /extension/src/MapSingleton.hpp
parent12d2e458b0c8f0b57b0e42f3dd9fe992e3ebc5b8 (diff)
Function pointer -> std::function
Diffstat (limited to 'extension/src/MapSingleton.hpp')
-rw-r--r--extension/src/MapSingleton.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/extension/src/MapSingleton.hpp b/extension/src/MapSingleton.hpp
index 55d2883..7d50d55 100644
--- a/extension/src/MapSingleton.hpp
+++ b/extension/src/MapSingleton.hpp
@@ -1,12 +1,14 @@
#pragma once
+#include <functional>
+
#include <godot_cpp/classes/image.hpp>
#include "openvic2/Map.hpp"
namespace OpenVic2 {
class MapSingleton : public godot::Object {
- using parse_json_entry_func_t = godot::Error (MapSingleton::*)(godot::String const& identifier, godot::Variant const& entry);
+ using parse_json_entry_func_t = std::function<godot::Error (godot::String const&, godot::Variant const&)>;
GDCLASS(MapSingleton, godot::Object)
@@ -17,7 +19,7 @@ namespace OpenVic2 {
Mapmode::index_t mapmode_index = 0;
godot::Error parse_json_dictionary_file(godot::String const& file_description, godot::String const& file_path,
- godot::String const& identifier_prefix, parse_json_entry_func_t parse_entry);
+ godot::String const& identifier_prefix, parse_json_entry_func_t parse_entry) const;
godot::Error _parse_province_identifier_entry(godot::String const& identifier, godot::Variant const& entry);
godot::Error _parse_region_entry(godot::String const& identifier, godot::Variant const& entry);
protected: