diff --git a/src/engine/vk/test/main.cpp b/src/engine/vk/test/main.cpp index 9176827..2bf589a 100644 --- a/src/engine/vk/test/main.cpp +++ b/src/engine/vk/test/main.cpp @@ -82,11 +82,11 @@ int main() { Assimp::Importer importer; const auto& scene = importer.ReadFile("../../src/engine/vk/test/vikingroom.glb", aiProcessPreset_TargetRealtime_Fast); - if (!scene) + if (nullptr == scene) throw std::runtime_error("Failed to load model from file"); const auto& mesh = scene->mMeshes[0]; - std::vector vertices{mesh->mNumVertices}; + std::vector vertices(mesh->mNumVertices); for (uint32_t i = 0; i < mesh->mNumVertices; i++) { const auto& vertex = mesh->mVertices[i]; const auto& color = mesh->HasVertexColors(i) ? *mesh->mColors[i] : aiColor4D{1.0f, 1.0f, 1.0f, 1.0f}; @@ -99,9 +99,9 @@ int main() { }; } - std::vector indices{mesh->mNumFaces * 3}; + std::vector indices(mesh->mNumFaces * 3); for (uint32_t i = 0; i < mesh->mNumFaces; i++) { - const auto& face = mesh->mFaces[i]; + const auto &face = mesh->mFaces[i]; if (face.mNumIndices != 3) { spdlog::warn("Skipping face with {} indices", face.mNumIndices); continue;