diff --git a/apps/openmw_test_suite/CMakeLists.txt b/apps/openmw_test_suite/CMakeLists.txt index 7cfac20421..57e05b8511 100644 --- a/apps/openmw_test_suite/CMakeLists.txt +++ b/apps/openmw_test_suite/CMakeLists.txt @@ -41,10 +41,11 @@ if (GTEST_FOUND AND GMOCK_FOUND) detournavigator/recastmeshobject.cpp detournavigator/navmeshtilescache.cpp detournavigator/tilecachedrecastmeshmanager.cpp - detournavigator/serialization/binaryreader.cpp - detournavigator/serialization/binarywriter.cpp - detournavigator/serialization/sizeaccumulator.cpp - detournavigator/serialization/integration.cpp + + serialization/binaryreader.cpp + serialization/binarywriter.cpp + serialization/sizeaccumulator.cpp + serialization/integration.cpp settings/parser.cpp diff --git a/apps/openmw_test_suite/detournavigator/serialization/binaryreader.cpp b/apps/openmw_test_suite/serialization/binaryreader.cpp similarity index 93% rename from apps/openmw_test_suite/detournavigator/serialization/binaryreader.cpp rename to apps/openmw_test_suite/serialization/binaryreader.cpp index d071326cf5..cb4f5c57bd 100644 --- a/apps/openmw_test_suite/detournavigator/serialization/binaryreader.cpp +++ b/apps/openmw_test_suite/serialization/binaryreader.cpp @@ -1,6 +1,6 @@ #include "format.hpp" -#include +#include #include #include @@ -12,8 +12,8 @@ namespace { using namespace testing; - using namespace DetourNavigator::Serialization; - using namespace DetourNavigator::SerializationTesting; + using namespace Serialization; + using namespace SerializationTesting; TEST(DetourNavigatorSerializationBinaryReaderTest, shouldReadArithmeticTypeValue) { diff --git a/apps/openmw_test_suite/detournavigator/serialization/binarywriter.cpp b/apps/openmw_test_suite/serialization/binarywriter.cpp similarity index 91% rename from apps/openmw_test_suite/detournavigator/serialization/binarywriter.cpp rename to apps/openmw_test_suite/serialization/binarywriter.cpp index fccc2be3da..cb0f29ba85 100644 --- a/apps/openmw_test_suite/detournavigator/serialization/binarywriter.cpp +++ b/apps/openmw_test_suite/serialization/binarywriter.cpp @@ -1,6 +1,6 @@ #include "format.hpp" -#include +#include #include #include @@ -12,8 +12,8 @@ namespace { using namespace testing; - using namespace DetourNavigator::Serialization; - using namespace DetourNavigator::SerializationTesting; + using namespace Serialization; + using namespace SerializationTesting; TEST(DetourNavigatorSerializationBinaryWriterTest, shouldWriteArithmeticTypeValue) { diff --git a/apps/openmw_test_suite/detournavigator/serialization/format.hpp b/apps/openmw_test_suite/serialization/format.hpp similarity index 89% rename from apps/openmw_test_suite/detournavigator/serialization/format.hpp rename to apps/openmw_test_suite/serialization/format.hpp index 7c5e26a0be..8f61838fde 100644 --- a/apps/openmw_test_suite/detournavigator/serialization/format.hpp +++ b/apps/openmw_test_suite/serialization/format.hpp @@ -1,12 +1,12 @@ -#ifndef OPENMW_TEST_SUITE_DETOURNAVIGATOR_SERIALIZATION_FORMAT_H -#define OPENMW_TEST_SUITE_DETOURNAVIGATOR_SERIALIZATION_FORMAT_H +#ifndef OPENMW_TEST_SUITE_SERIALIZATION_FORMAT_H +#define OPENMW_TEST_SUITE_SERIALIZATION_FORMAT_H -#include +#include #include #include -namespace DetourNavigator::SerializationTesting +namespace SerializationTesting { struct Pod { diff --git a/apps/openmw_test_suite/detournavigator/serialization/integration.cpp b/apps/openmw_test_suite/serialization/integration.cpp similarity index 85% rename from apps/openmw_test_suite/detournavigator/serialization/integration.cpp rename to apps/openmw_test_suite/serialization/integration.cpp index e7e8eacc20..cb8c711c67 100644 --- a/apps/openmw_test_suite/detournavigator/serialization/integration.cpp +++ b/apps/openmw_test_suite/serialization/integration.cpp @@ -1,8 +1,8 @@ #include "format.hpp" -#include -#include -#include +#include +#include +#include #include #include @@ -12,8 +12,8 @@ namespace { using namespace testing; - using namespace DetourNavigator::Serialization; - using namespace DetourNavigator::SerializationTesting; + using namespace Serialization; + using namespace SerializationTesting; struct DetourNavigatorSerializationIntegrationTest : Test { diff --git a/apps/openmw_test_suite/detournavigator/serialization/sizeaccumulator.cpp b/apps/openmw_test_suite/serialization/sizeaccumulator.cpp similarity index 85% rename from apps/openmw_test_suite/detournavigator/serialization/sizeaccumulator.cpp rename to apps/openmw_test_suite/serialization/sizeaccumulator.cpp index 39b7ea8646..dce148468a 100644 --- a/apps/openmw_test_suite/detournavigator/serialization/sizeaccumulator.cpp +++ b/apps/openmw_test_suite/serialization/sizeaccumulator.cpp @@ -1,6 +1,6 @@ #include "format.hpp" -#include +#include #include @@ -12,8 +12,8 @@ namespace { using namespace testing; - using namespace DetourNavigator::Serialization; - using namespace DetourNavigator::SerializationTesting; + using namespace Serialization; + using namespace SerializationTesting; TEST(DetourNavigatorSerializationSizeAccumulatorTest, shouldProvideSizeForArithmeticType) { diff --git a/components/detournavigator/serialization/binaryreader.hpp b/components/serialization/binaryreader.hpp similarity index 89% rename from components/detournavigator/serialization/binaryreader.hpp rename to components/serialization/binaryreader.hpp index 0d75c3ac99..65b1e2f9d8 100644 --- a/components/detournavigator/serialization/binaryreader.hpp +++ b/components/serialization/binaryreader.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_BINARYREADER_H -#define OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_BINARYREADER_H +#ifndef OPENMW_COMPONENTS_SERIALIZATION_BINARYREADER_H +#define OPENMW_COMPONENTS_SERIALIZATION_BINARYREADER_H #include #include @@ -7,7 +7,7 @@ #include #include -namespace DetourNavigator::Serialization +namespace Serialization { class BinaryReader { diff --git a/components/detournavigator/serialization/binarywriter.hpp b/components/serialization/binarywriter.hpp similarity index 89% rename from components/detournavigator/serialization/binarywriter.hpp rename to components/serialization/binarywriter.hpp index 5e710d85d5..de549c7e02 100644 --- a/components/detournavigator/serialization/binarywriter.hpp +++ b/components/serialization/binarywriter.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_BINARYWRITER_H -#define OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_BINARYWRITER_H +#ifndef OPENMW_COMPONENTS_SERIALIZATION_BINARYWRITER_H +#define OPENMW_COMPONENTS_SERIALIZATION_BINARYWRITER_H #include #include @@ -7,7 +7,7 @@ #include #include -namespace DetourNavigator::Serialization +namespace Serialization { struct BinaryWriter { diff --git a/components/detournavigator/serialization/format.hpp b/components/serialization/format.hpp similarity index 90% rename from components/detournavigator/serialization/format.hpp rename to components/serialization/format.hpp index d07ab9da6f..5d287e80cf 100644 --- a/components/detournavigator/serialization/format.hpp +++ b/components/serialization/format.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_FORMAT_H -#define OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_FORMAT_H +#ifndef OPENMW_COMPONENTS_SERIALIZATION_FORMAT_H +#define OPENMW_COMPONENTS_SERIALIZATION_FORMAT_H #include #include @@ -8,7 +8,7 @@ #include #include -namespace DetourNavigator::Serialization +namespace Serialization { enum class Mode { @@ -22,6 +22,9 @@ namespace DetourNavigator::Serialization template struct IsContiguousContainer> : std::true_type {}; + template + struct IsContiguousContainer> : std::true_type {}; + template constexpr bool isContiguousContainer = IsContiguousContainer>::value; diff --git a/components/detournavigator/serialization/sizeaccumulator.hpp b/components/serialization/sizeaccumulator.hpp similarity index 81% rename from components/detournavigator/serialization/sizeaccumulator.hpp rename to components/serialization/sizeaccumulator.hpp index 28bdb5c1cb..2386fe7bea 100644 --- a/components/detournavigator/serialization/sizeaccumulator.hpp +++ b/components/serialization/sizeaccumulator.hpp @@ -1,10 +1,10 @@ -#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_SIZEACCUMULATOR_H -#define OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_SIZEACCUMULATOR_H +#ifndef OPENMW_COMPONENTS_SERIALIZATION_SIZEACCUMULATOR_H +#define OPENMW_COMPONENTS_SERIALIZATION_SIZEACCUMULATOR_H #include #include -namespace DetourNavigator::Serialization +namespace Serialization { class SizeAccumulator {