I used to write my code with JB Rider and compile it with VS native C++ compiler (CL). A few days ago I decided to use JB CLion with CMake. I thought that it should use my native compiler as well, so no differences should appear.
However
I have some code
uint64 size = get_some_size();
byte* buffer = new byte[size];
This code compiles without warnings in Rider, but when I run build with CMake I get:
warning C4244: 'initializing': conversion from 'uint64' to 'unsigned int', possible loss of data
It seems like CMake build force arrays to have size in unsigned int32
. Why and how to fix that?