From bedbe25876c6221edcf61628d7bb76c7f0eecd90 Mon Sep 17 00:00:00 2001 From: elushaX Date: Sun, 16 Jun 2024 07:17:34 +0300 Subject: [PATCH] Windows update --- 3DEditor/applications/SceneLoad.cpp | 6 +++--- Externals/CMakeLists.txt | 6 +++++- Objects/private/core/Object.cpp | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/3DEditor/applications/SceneLoad.cpp b/3DEditor/applications/SceneLoad.cpp index bc03e0c..c9e9a13 100644 --- a/3DEditor/applications/SceneLoad.cpp +++ b/3DEditor/applications/SceneLoad.cpp @@ -25,9 +25,9 @@ bool loadMeshes(tp::Scene& scene, const std::string& objetsPath) { } for (int j = 0; j < curMesh.Indices.size(); j += 3) { - uint idx1 = (int) curMesh.Indices[j]; - uint idx2 = (int) curMesh.Indices[j + 1]; - uint idx3 = (int) curMesh.Indices[j + 2]; + uint4 idx1 = (int) curMesh.Indices[j]; + uint4 idx2 = (int) curMesh.Indices[j + 1]; + uint4 idx3 = (int) curMesh.Indices[j + 2]; // printf("{ %i, %i, %i },\n", idx1, idx2, idx3); object->mTopology.Indexes.append({ idx1, idx2, idx3 }); } diff --git a/Externals/CMakeLists.txt b/Externals/CMakeLists.txt index 48984ed..d1801ac 100644 --- a/Externals/CMakeLists.txt +++ b/Externals/CMakeLists.txt @@ -31,7 +31,11 @@ endif() #add_subdirectory(unittest-cpp) add_subdirectory(lalr) -target_compile_options(UnitTest++ PUBLIC -Wno-error) +if(CMAKE_SYSTEM_NAME STREQUAL "Windows") +else() + target_compile_options(UnitTest++ PUBLIC -Wno-error) +endif() + add_subdirectory(glfw) diff --git a/Objects/private/core/Object.cpp b/Objects/private/core/Object.cpp index c0a4bd2..e537cdf 100644 --- a/Objects/private/core/Object.cpp +++ b/Objects/private/core/Object.cpp @@ -42,7 +42,7 @@ void obj::save_string(ArchiverOut& file, const std::string& string) { ualni obj::save_string_size(const std::string& string) { return string.size() + sizeof(string.size()); } void obj::load_string(ArchiverIn& file, std::string& out) { - typeof(out.size()) size; + std::size_t size; file >> size; auto buff = new char[size + 1]; file.readBytes(buff, size);