diff --git a/code/28_model_loading.cpp b/code/28_model_loading.cpp index 319e4f7f..0097a311 100644 --- a/code/28_model_loading.cpp +++ b/code/28_model_loading.cpp @@ -995,10 +995,10 @@ class HelloTriangleApplication { tinyobj::attrib_t attrib; std::vector shapes; std::vector materials; - std::string warn, err; + std::string err; - if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &warn, &err, MODEL_PATH.c_str())) { - throw std::runtime_error(warn + err); + if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &err, MODEL_PATH.c_str())) { + throw std::runtime_error(err); } std::unordered_map uniqueVertices{}; diff --git a/code/29_mipmapping.cpp b/code/29_mipmapping.cpp index ae0cadf5..874a8d82 100644 --- a/code/29_mipmapping.cpp +++ b/code/29_mipmapping.cpp @@ -1089,10 +1089,10 @@ class HelloTriangleApplication { tinyobj::attrib_t attrib; std::vector shapes; std::vector materials; - std::string warn, err; + std::string err; - if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &warn, &err, MODEL_PATH.c_str())) { - throw std::runtime_error(warn + err); + if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &err, MODEL_PATH.c_str())) { + throw std::runtime_error(err); } std::unordered_map uniqueVertices{}; diff --git a/code/30_multisampling.cpp b/code/30_multisampling.cpp index 638c2219..ab6cbc3f 100644 --- a/code/30_multisampling.cpp +++ b/code/30_multisampling.cpp @@ -1139,10 +1139,10 @@ class HelloTriangleApplication { tinyobj::attrib_t attrib; std::vector shapes; std::vector materials; - std::string warn, err; + std::string err; - if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &warn, &err, MODEL_PATH.c_str())) { - throw std::runtime_error(warn + err); + if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &err, MODEL_PATH.c_str())) { + throw std::runtime_error(err); } std::unordered_map uniqueVertices{}; diff --git a/en/08_Loading_models.md b/en/08_Loading_models.md index 620e31bf..f3ae89c0 100644 --- a/en/08_Loading_models.md +++ b/en/08_Loading_models.md @@ -138,10 +138,10 @@ void loadModel() { tinyobj::attrib_t attrib; std::vector shapes; std::vector materials; - std::string warn, err; + std::string err; - if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &warn, &err, MODEL_PATH.c_str())) { - throw std::runtime_error(warn + err); + if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &err, MODEL_PATH.c_str())) { + throw std::runtime_error(err); } } ``` diff --git "a/fr/08_Charger_des_mod\303\250les.md" "b/fr/08_Charger_des_mod\303\250les.md" index 13a9b35e..04cdfda1 100644 --- "a/fr/08_Charger_des_mod\303\250les.md" +++ "b/fr/08_Charger_des_mod\303\250les.md" @@ -120,10 +120,10 @@ void loadModel() { tinyobj::attrib_t attrib; std::vector shapes; std::vector materials; - std::string warn, err; + std::string err; - if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &warn, &err, MODEL_PATH.c_str())) { - throw std::runtime_error(warn + err); + if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &err, MODEL_PATH.c_str())) { + throw std::runtime_error(err); } } ```