diff options
author | Spartan322 <Megacake1234@gmail.com> | 2023-04-24 05:36:42 +0200 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2023-05-02 00:50:24 +0200 |
commit | 112de0ac9c7ce26bd75d06e4cd3bc91adee716e3 (patch) | |
tree | 8c2376ce06c164e10fe815723e5601f2a7bebf02 /extension/src/openvic2/map/Map.hpp | |
parent | b1e985e0774598b3add22069be50f891e981fd79 (diff) |
Support features up to clang-format 14
Add .editorconfig
Update C++ files within `extension/src` to follow .clang-format
Diffstat (limited to 'extension/src/openvic2/map/Map.hpp')
-rw-r--r-- | extension/src/openvic2/map/Map.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/extension/src/openvic2/map/Map.hpp b/extension/src/openvic2/map/Map.hpp index cb8dcb1..4fc97c9 100644 --- a/extension/src/openvic2/map/Map.hpp +++ b/extension/src/openvic2/map/Map.hpp @@ -9,13 +9,15 @@ namespace OpenVic2 { struct Mapmode : HasIdentifier { friend struct Map; - using colour_func_t = std::function<colour_t (Map const&, Province const&)>; + using colour_func_t = std::function<colour_t(Map const&, Province const&)>; using index_t = size_t; + private: const index_t index; const colour_func_t colour_func; Mapmode(index_t new_index, std::string const& new_identifier, colour_func_t new_colour_func); + public: index_t get_index() const; colour_t get_colour(Map const& map, Province const& province) const; @@ -28,12 +30,12 @@ namespace OpenVic2 { using terrain_t = uint8_t; using terrain_variant_map_t = std::map<colour_t, terrain_t>; - #pragma pack(push, 1) +#pragma pack(push, 1) struct shape_pixel_t { index_t index; terrain_t terrain; }; - #pragma pack(pop) +#pragma pack(pop) private: using colour_index_map_t = std::map<colour_t, index_t>; @@ -48,6 +50,7 @@ namespace OpenVic2 { colour_index_map_t colour_index_map; index_t get_index_from_colour(colour_t colour) const; + public: Map(); |