In a previous tutorial Chili showed conversion between 'floats' and 'ints' and how they can cause warnings. These seem to be the same thing with 'doubles' and 'floats'.
I wonder if I should just ignore them for now since game seems to be working fine. On the other hand, as Chili was saying, these are filling the build window and may potentially make other warnings harder to notice.
I am using VS2017 and both SDK 10 and SDK 8.1 are installed. It seems Chili was using VS2015 while making these tutorials and samples. Could that be the reason? How to fix it?
Code: Select all
1>------ Build started: Project: Engine, Configuration: Debug x64 ------
1>compilation header save succeeded; see C:\Users\user\Documents\Visual Studio 2017\Projects\Snek\Engine\FramebufferPS.shh
1>compilation header save succeeded; see C:\Users\user\Documents\Visual Studio 2017\Projects\Snek\Engine\FramebufferVS.shh
1>Board.cpp
1>DXErr.cpp
1>FrameTimer.cpp
1>Game.cpp
1>Goal.cpp
1>Graphics.cpp
1>Keyboard.cpp
1>Main.cpp
1>MainWindow.cpp
1>Mouse.cpp
1>Snake.cpp
1>Sound.cpp
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.10.25017\include\random(3790): warning C4244: '=': conversion from 'double' to 'float', possible loss of data (compiling source file Game.cpp)
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.10.25017\include\random(3725): note: see reference to function template instantiation 'float std::normal_distribution<float>::_Eval<_Engine>(_Engine &,const std::normal_distribution<float>::param_type &,bool)' being compiled
1> with
1> [
1> _Engine=std::mt19937
1> ] (compiling source file Game.cpp)
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.10.25017\include\random(3725): note: see reference to function template instantiation 'float std::normal_distribution<float>::_Eval<_Engine>(_Engine &,const std::normal_distribution<float>::param_type &,bool)' being compiled
1> with
1> [
1> _Engine=std::mt19937
1> ] (compiling source file Game.cpp)
1>c:\users\user\documents\visual studio 2017\projects\snek\engine\soundeffect.h(58): note: see reference to function template instantiation 'float std::normal_distribution<float>::operator ()<T>(_Engine &)' being compiled
1> with
1> [
1> T=std::mt19937,
1> _Engine=std::mt19937
1> ] (compiling source file Game.cpp)
1>c:\users\user\documents\visual studio 2017\projects\snek\engine\soundeffect.h(58): note: see reference to function template instantiation 'float std::normal_distribution<float>::operator ()<T>(_Engine &)' being compiled
1> with
1> [
1> T=std::mt19937,
1> _Engine=std::mt19937
1> ] (compiling source file Game.cpp)
1>c:\users\user\documents\visual studio 2017\projects\snek\engine\game.cpp(90): note: see reference to function template instantiation 'void SoundEffect::Play<std::mt19937>(T &,float)' being compiled
1> with
1> [
1> T=std::mt19937
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.10.25017\include\random(3793): warning C4244: '=': conversion from 'double' to 'float', possible loss of data (compiling source file Game.cpp)
1>SpriteCodex.cpp
1>Engine.vcxproj -> C:\Users\user\Documents\Visual Studio 2017\Projects\Snek\x64\Debug\Engine.exe
1>Engine.vcxproj -> C:\Users\user\Documents\Visual Studio 2017\Projects\Snek\x64\Debug\Engine.pdb (Partial PDB)
1>Done building project "Engine.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========