From 43172238f785d115969fc382f52391a55c0e3c4f Mon Sep 17 00:00:00 2001 From: AlvaroBarua Date: Sun, 11 Sep 2022 00:41:43 +0100 Subject: [PATCH] Fixes compiler warning on VS (Unreachable code detected) --- tiny_gltf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index 8a4554b..c0ac0c6 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -3873,7 +3873,7 @@ static bool ParseImage(Image *image, const int image_idx, std::string *err, image->uri = uri; #ifdef TINYGLTF_NO_EXTERNAL_IMAGE return true; -#endif +#else std::string decoded_uri = dlib::urldecode(uri); if (!LoadExternalFile(&img, err, warn, decoded_uri, basedir, /* required */ false, /* required bytes */ 0, @@ -3895,6 +3895,7 @@ static bool ParseImage(Image *image, const int image_idx, std::string *err, } return false; } +#endif } if (*LoadImageData == nullptr) {