From d927208ab36f32f9150d2908a4c70fd039f413ef Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Sat, 17 Mar 2018 10:52:21 +0100 Subject: Fix a few warnings spit out by MSVC compiler: --- BuddhaTest/src/BuddhaTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'BuddhaTest') diff --git a/BuddhaTest/src/BuddhaTest.cpp b/BuddhaTest/src/BuddhaTest.cpp index 14f4dd3..daf7fa5 100644 --- a/BuddhaTest/src/BuddhaTest.cpp +++ b/BuddhaTest/src/BuddhaTest.cpp @@ -4,6 +4,7 @@ #include #include #include +#include void error_callback(int error, const char* description) { @@ -149,7 +150,7 @@ int main(int argc, char * argv[]) uint32_t iterationsPerFrame = 1; - Helpers::PIDController pid{0.0f,0.0f,1e-8f}; + Helpers::PIDController pid{0.0f,0.0f,1e-8f}; const uint32_t targetFrameDuration{1000000/settings.targetFrameRate}; /* Loop until the user closes the window */ @@ -193,7 +194,7 @@ int main(int argc, char * argv[]) if(frameDuration > 0) { const auto error{targetFrameDuration - frameDuration}; - const auto pidOutput{pid.Update(frameDuration,error)}; + const auto pidOutput{pid.Update((frameDuration),float(error))}; iterationsPerFrame = std::max(1,static_cast(pidOutput)); //std::cout << iterationsPerFrame << " " << pidOutput << std::endl; @@ -212,7 +213,7 @@ int main(int argc, char * argv[]) //too lazy to change WriteOutputPng... std::vector combinedBuffer(3*pixelCount); - for(int i=0;i<3*pixelCount;++i) + for(uint32_t i=0;i<3*pixelCount;++i) { combinedBuffer[i] = readBackBuffers[i%3][i/3]; } -- cgit v1.2.3