From ff8d50c8d0124cdd1299f52dc296cad4d3e4b596 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Tue, 12 Jan 2021 08:23:53 -0800 Subject: [PATCH] Fix MSVC compiler warnings --- code/Pbrt/PbrtExporter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/Pbrt/PbrtExporter.cpp b/code/Pbrt/PbrtExporter.cpp index 9e93aa744..f1e4e46d8 100644 --- a/code/Pbrt/PbrtExporter.cpp +++ b/code/Pbrt/PbrtExporter.cpp @@ -727,7 +727,7 @@ void PbrtExporter::WriteLights() { aiColor3D color = light->mColorDiffuse + light->mColorSpecular; if (light->mAttenuationConstant != 0) - color = color * (1. / light->mAttenuationConstant); + color = color * (ai_real)(1. / light->mAttenuationConstant); switch (light->mType) { case aiLightSource_DIRECTIONAL: { @@ -771,8 +771,8 @@ void PbrtExporter::WriteLights() { mOutput << " \"rgb L\" [ " << color.r << " " << color.g << " " << color.b << " ]\n"; mOutput << " Shape \"bilinearmesh\"\n"; mOutput << " \"point3 p\" [ "; - for (int i = 0; i < 4; ++i) - mOutput << vertices[i].x << " " << vertices[i].y << " " << vertices[i].z; + for (int j = 0; j < 4; ++j) + mOutput << vertices[j].x << " " << vertices[j].y << " " << vertices[j].z; mOutput << " ]\n"; mOutput << " \"integer indices\" [ 0 1 2 3 ]\n"; break;