From f3ede96017dac58f2c933aa8204e89b2aebe9935 Mon Sep 17 00:00:00 2001 From: David G Yu Date: Fri, 20 Dec 2019 12:43:44 -0800 Subject: [PATCH] Fixed warnings in examples and regression/common --- examples/dxPtexViewer/sky.cpp | 6 +++--- regression/common/arg_utils.cpp | 2 +- regression/common/arg_utils.h | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/dxPtexViewer/sky.cpp b/examples/dxPtexViewer/sky.cpp index 17a5a403..9ac81dbe 100644 --- a/examples/dxPtexViewer/sky.cpp +++ b/examples/dxPtexViewer/sky.cpp @@ -164,9 +164,9 @@ Sky::initialize(ID3D11Device * device) { for (int v = 0; v < V_DIV; ++v) { float s = float(2*M_PI*float(u)/U_DIV); float t = float(M_PI*float(v)/(V_DIV-1)); - vbo.push_back(-sin(t)*sin(s)); - vbo.push_back(cos(t)); - vbo.push_back(-sin(t)*cos(s)); + vbo.push_back(-sinf(t)*sinf(s)); + vbo.push_back(cosf(t)); + vbo.push_back(-sinf(t)*cosf(s)); vbo.push_back(u/float(U_DIV)); vbo.push_back(v/float(V_DIV)); diff --git a/regression/common/arg_utils.cpp b/regression/common/arg_utils.cpp index 2592de1c..401f91f2 100644 --- a/regression/common/arg_utils.cpp +++ b/regression/common/arg_utils.cpp @@ -102,7 +102,7 @@ ArgOptions::PrintUnrecognizedArgsWarnings() const } } -int +size_t ArgOptions::AppendObjShapes(std::vector& shapes, bool warn) const { size_t originalShapesSize = shapes.size(); diff --git a/regression/common/arg_utils.h b/regression/common/arg_utils.h index 0c3c085c..76e09db4 100644 --- a/regression/common/arg_utils.h +++ b/regression/common/arg_utils.h @@ -72,7 +72,8 @@ public: // Operations on parsed arguments // - int AppendObjShapes(std::vector& shapes, bool warn = true) const; + size_t AppendObjShapes(std::vector& shapes, + bool warn = true) const; private: