Working correctly

This commit is contained in:
Pcornat 2024-10-30 20:04:07 +01:00
parent e2d598d5d0
commit 9d57971414
Signed by: Pcornat
GPG Key ID: E0326CC678A00BDD
3 changed files with 6 additions and 4 deletions

View File

@ -2,9 +2,9 @@
<project version="4">
<component name="CMakeSharedSettings">
<configurations>
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" GENERATION_OPTIONS="-G Ninja" />
<configuration PROFILE_NAME="Debug Coverage" ENABLED="true" CONFIG_NAME="Debug" GENERATION_OPTIONS="-G Ninja -DENABLE_COVERAGE=ON" />
<configuration PROFILE_NAME="Release" ENABLED="true" CONFIG_NAME="Release" GENERATION_OPTIONS="-G Ninja" />
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" GENERATION_OPTIONS="-G Ninja -DJSON_SystemInclude=ON" />
<configuration PROFILE_NAME="Debug Coverage" ENABLED="true" CONFIG_NAME="Debug" GENERATION_OPTIONS="-G Ninja -DENABLE_COVERAGE=ON -DJSON_SystemInclude=ON" />
<configuration PROFILE_NAME="Release" ENABLED="true" CONFIG_NAME="Release" GENERATION_OPTIONS="-G Ninja -DJSON_SystemInclude=ON" />
</configurations>
</component>
</project>

View File

@ -11,6 +11,7 @@
#include <variant>
#include <string_view>
#include <unordered_map>
#include <nlohmann/json_fwd.hpp>
#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<billyEnums, billyObjects>;
static constexpr std::array<billyEnums, 12> all_objects{

View File

@ -1,6 +1,7 @@
#include "billy_objects.hpp"
#include "characteristic.hpp"
#include "character_sheet.hpp"
#include <nlohmann/json.hpp>
std::uint32_t constexpr const_hash(const char *input) {
return *input ? static_cast<unsigned int>(*input) + 33 * const_hash(input + 1) : 5381;