From 112de0ac9c7ce26bd75d06e4cd3bc91adee716e3 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Sun, 23 Apr 2023 23:36:42 -0400 Subject: Support features up to clang-format 14 Add .editorconfig Update C++ files within `extension/src` to follow .clang-format --- extension/src/openvic2/map/Map.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'extension/src/openvic2/map/Map.hpp') 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; + using colour_func_t = std::function; 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; - #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; @@ -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(); -- cgit v1.2.3-56-ga3b1