From 9d57971414dd181abbb0d172e768e05608ff6166 Mon Sep 17 00:00:00 2001 From: Pcornat Date: Wed, 30 Oct 2024 20:04:07 +0100 Subject: [PATCH] Working correctly --- .idea/cmake.xml | 6 +++--- include/billy_objects.hpp | 3 ++- src/billy_objects.cpp | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.idea/cmake.xml b/.idea/cmake.xml index 4f2501f..221a8cc 100644 --- a/.idea/cmake.xml +++ b/.idea/cmake.xml @@ -2,9 +2,9 @@ - - - + + + \ No newline at end of file diff --git a/include/billy_objects.hpp b/include/billy_objects.hpp index 6f8462b..7a9e765 100644 --- a/include/billy_objects.hpp +++ b/include/billy_objects.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include "generic_object.hpp" @@ -22,7 +23,7 @@ namespace character { class BillyObjects final { public: - static constexpr std::size_t max_num_obj{ 3 }; + using json = nlohmann::json; using container = std::unordered_map; static constexpr std::array all_objects{ diff --git a/src/billy_objects.cpp b/src/billy_objects.cpp index d2d40f4..6b7ce6e 100644 --- a/src/billy_objects.cpp +++ b/src/billy_objects.cpp @@ -1,6 +1,7 @@ #include "billy_objects.hpp" #include "characteristic.hpp" #include "character_sheet.hpp" +#include std::uint32_t constexpr const_hash(const char *input) { return *input ? static_cast(*input) + 33 * const_hash(input + 1) : 5381;