Windows update

This commit is contained in:
elushaX 2024-06-16 07:17:34 +03:00 committed by Ilya Shurupov
parent 19f492dff1
commit 6b77faced8
3 changed files with 9 additions and 5 deletions

View file

@ -25,9 +25,9 @@ bool loadMeshes(tp::Scene& scene, const std::string& objetsPath) {
} }
for (int j = 0; j < curMesh.Indices.size(); j += 3) { for (int j = 0; j < curMesh.Indices.size(); j += 3) {
uint idx1 = (int) curMesh.Indices[j]; uint4 idx1 = (int) curMesh.Indices[j];
uint idx2 = (int) curMesh.Indices[j + 1]; uint4 idx2 = (int) curMesh.Indices[j + 1];
uint idx3 = (int) curMesh.Indices[j + 2]; uint4 idx3 = (int) curMesh.Indices[j + 2];
// printf("{ %i, %i, %i },\n", idx1, idx2, idx3); // printf("{ %i, %i, %i },\n", idx1, idx2, idx3);
object->mTopology.Indexes.append({ idx1, idx2, idx3 }); object->mTopology.Indexes.append({ idx1, idx2, idx3 });
} }

View file

@ -31,7 +31,11 @@ endif()
#add_subdirectory(unittest-cpp) #add_subdirectory(unittest-cpp)
add_subdirectory(lalr) add_subdirectory(lalr)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
else()
target_compile_options(UnitTest++ PUBLIC -Wno-error) target_compile_options(UnitTest++ PUBLIC -Wno-error)
endif()
add_subdirectory(glfw) add_subdirectory(glfw)

View file

@ -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()); } ualni obj::save_string_size(const std::string& string) { return string.size() + sizeof(string.size()); }
void obj::load_string(ArchiverIn& file, std::string& out) { void obj::load_string(ArchiverIn& file, std::string& out) {
typeof(out.size()) size; std::size_t size;
file >> size; file >> size;
auto buff = new char[size + 1]; auto buff = new char[size + 1];
file.readBytes(buff, size); file.readBytes(buff, size);