Fix VS2019 compiler warnings in demos solution

This commit is contained in:
Jake Turner
2021-07-02 08:29:35 +01:00
committed by Baldur Karlsson
parent b3f57d1427
commit fc08cb17f9
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ public:
return Vec3f(y * o.z - z * o.y, z * o.x - x * o.z, x * o.y - y * o.x);
}
inline float Length() const { return sqrt(Dot(*this)); }
inline float Length() const { return sqrtf(Dot(*this)); }
inline void Normalise()
{
float l = Length();
+2 -2
View File
@@ -364,8 +364,8 @@ void main()
vkh::cmdBindVertexBuffers(cmd, 0, {vb.buffer}, {0});
VkRect2D s = {{0, 0},
{uint32_t(screenWidth / (int)sqrt(descriptorCount)),
uint32_t(screenHeight / (int)sqrt(descriptorCount))}};
{uint32_t(screenWidth / (int)sqrtf((float)descriptorCount)),
uint32_t(screenHeight / (int)sqrtf((float)descriptorCount))}};
VkViewport v = {0, 0, (float)s.extent.width, (float)s.extent.height, 0, 1};
size_t randSeed = curFrame * threadIndex + threadIndex;
+2 -2
View File
@@ -552,8 +552,8 @@ void main()
v = mainWindow->viewport;
v.width /= 8.0f;
v.height /= 8.0f;
v.width = floor(v.width);
v.height = floor(v.height);
v.width = floorf(v.width);
v.height = floorf(v.height);
v.x += 2.0f;
v.y += 2.0f;
v.width -= 4.0f;