From dd56a57a3e7239f7a08b844b379edcfb1e27ef97 Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 1 Oct 2023 10:50:39 +0200 Subject: [PATCH] Fix build with g++13 --- src/Common/StateMap/StateMapLayout.cpp | 1 + src/Common/StateMap/StateMapLayout.h | 2 +- src/ObjCommon/StructuredDataDef/CommonStructuredDataEnum.h | 3 ++- src/ObjCommon/StructuredDataDef/CommonStructuredDataStruct.h | 2 +- src/RawTemplater/RawTemplater.cpp | 4 ++++ src/ZoneCommon/Zone/XBlock.h | 1 + src/ZoneCommon/Zone/XChunk/AbstractSalsa20Processor.cpp | 2 +- .../Loading/Exception/InvalidXBlockSizeException.h | 1 + 8 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Common/StateMap/StateMapLayout.cpp b/src/Common/StateMap/StateMapLayout.cpp index 08e71b7d..fc07b265 100644 --- a/src/Common/StateMap/StateMapLayout.cpp +++ b/src/Common/StateMap/StateMapLayout.cpp @@ -1,5 +1,6 @@ #include "StateMapLayout.h" +#include #include using namespace state_map; diff --git a/src/Common/StateMap/StateMapLayout.h b/src/Common/StateMap/StateMapLayout.h index 7c306cdb..e68c1492 100644 --- a/src/Common/StateMap/StateMapLayout.h +++ b/src/Common/StateMap/StateMapLayout.h @@ -1,5 +1,5 @@ #pragma once - +#include #include #include diff --git a/src/ObjCommon/StructuredDataDef/CommonStructuredDataEnum.h b/src/ObjCommon/StructuredDataDef/CommonStructuredDataEnum.h index 3d9d63f6..86b1fd69 100644 --- a/src/ObjCommon/StructuredDataDef/CommonStructuredDataEnum.h +++ b/src/ObjCommon/StructuredDataDef/CommonStructuredDataEnum.h @@ -1,5 +1,6 @@ #pragma once - +#include +#include #include #include diff --git a/src/ObjCommon/StructuredDataDef/CommonStructuredDataStruct.h b/src/ObjCommon/StructuredDataDef/CommonStructuredDataStruct.h index 1f3cf770..3dbf02a6 100644 --- a/src/ObjCommon/StructuredDataDef/CommonStructuredDataStruct.h +++ b/src/ObjCommon/StructuredDataDef/CommonStructuredDataStruct.h @@ -1,5 +1,5 @@ #pragma once - +#include #include #include diff --git a/src/RawTemplater/RawTemplater.cpp b/src/RawTemplater/RawTemplater.cpp index be30b303..1f730039 100644 --- a/src/RawTemplater/RawTemplater.cpp +++ b/src/RawTemplater/RawTemplater.cpp @@ -50,6 +50,10 @@ public: if (!m_args.m_build_log_file.empty()) { + fs::path p = fs::path(m_args.m_build_log_file).parent_path(); + if (!p.empty()) + fs::create_directories(p); + m_build_log_file = std::ofstream(m_args.m_build_log_file, std::ios::out | std::ios::binary); if (!m_build_log_file.is_open()) { diff --git a/src/ZoneCommon/Zone/XBlock.h b/src/ZoneCommon/Zone/XBlock.h index f16b1fa4..b65c28df 100644 --- a/src/ZoneCommon/Zone/XBlock.h +++ b/src/ZoneCommon/Zone/XBlock.h @@ -1,4 +1,5 @@ #pragma once +#include #include class XBlock diff --git a/src/ZoneCommon/Zone/XChunk/AbstractSalsa20Processor.cpp b/src/ZoneCommon/Zone/XChunk/AbstractSalsa20Processor.cpp index 280fe922..b1bd7d1e 100644 --- a/src/ZoneCommon/Zone/XChunk/AbstractSalsa20Processor.cpp +++ b/src/ZoneCommon/Zone/XChunk/AbstractSalsa20Processor.cpp @@ -5,9 +5,9 @@ AbstractSalsa20Processor::AbstractSalsa20Processor(const int streamCount, std::string& zoneName, const uint8_t* salsa20Key, size_t keySize) : m_stream_count(streamCount), m_stream_contexts(std::make_unique(streamCount)), - m_block_hashes(std::make_unique(BLOCK_HASHES_COUNT * streamCount * SHA1_HASH_SIZE)), m_stream_block_indices(std::make_unique(streamCount)) { + m_block_hashes = std::make_unique(BLOCK_HASHES_COUNT * streamCount * SHA1_HASH_SIZE); InitStreams(zoneName, salsa20Key, keySize); } diff --git a/src/ZoneLoading/Loading/Exception/InvalidXBlockSizeException.h b/src/ZoneLoading/Loading/Exception/InvalidXBlockSizeException.h index aa198787..41ca32de 100644 --- a/src/ZoneLoading/Loading/Exception/InvalidXBlockSizeException.h +++ b/src/ZoneLoading/Loading/Exception/InvalidXBlockSizeException.h @@ -1,4 +1,5 @@ #pragma once +#include #include "LoadingException.h" class InvalidXBlockSizeException final : public LoadingException