diff --git a/lib/ivis_opengl/pielighting.cpp b/lib/ivis_opengl/pielighting.cpp index 92daa19e08f..4a1e57c0f82 100644 --- a/lib/ivis_opengl/pielighting.cpp +++ b/lib/ivis_opengl/pielighting.cpp @@ -84,11 +84,11 @@ namespace { BoundingBox getLightBoundingBox(const LIGHT& light) { glm::vec3 center = light.position; - center.z *= -1.; + center.z *= -1.f; float range = light.range; - glm::vec3 horizontal(1.0, 0., 0.); - glm::vec3 vertical(0.0, 1.0, 0.); - glm::vec3 forward(0.0, 0., 1.0f); + glm::vec3 horizontal(1.0f, 0.f, 0.f); + glm::vec3 vertical(0.f, 1.0f, 0.f); + glm::vec3 forward(0.f, 0.f, 1.0f); return BoundingBox{ center - horizontal * range - vertical * range - forward * range, diff --git a/src/droid.cpp b/src/droid.cpp index c0e3f64269a..493441e95d4 100644 --- a/src/droid.cpp +++ b/src/droid.cpp @@ -252,7 +252,7 @@ void addDroidDeathAnimationEffect(DROID *psDroid) { // FIXME: change when adding submarines to the game // modifiedModelMatrix *= glm::translate(glm::vec3(0.f, -world_coord(1) / 2.3f, 0.f)); - position.y += (world_coord(1) / 2.3f); + position.y += static_cast(world_coord(1) / 2.3f); } EFFECT_TYPE type = DROID_ANIMEVENT_DYING_NORMAL; diff --git a/src/hci/quickchat.cpp b/src/hci/quickchat.cpp index 57ff13c097f..2a12a5f6eb4 100644 --- a/src/hci/quickchat.cpp +++ b/src/hci/quickchat.cpp @@ -272,7 +272,7 @@ class WzQuickChatButton : public W_BUTTON lastWidgetWidth = width(); int textX0 = xPos + QuickChatButtonHorizontalPadding; - int textY0 = yPos + (h - wzMessageText.lineSize()) / 2 - float(wzMessageText.aboveBase()); + int textY0 = static_cast(yPos + (h - wzMessageText.lineSize()) / 2 - float(wzMessageText.aboveBase())); int maxTextDisplayableWidth = w - (QuickChatButtonHorizontalPadding * 2); isTruncated = maxTextDisplayableWidth < wzMessageText.width(); diff --git a/src/shadowcascades.cpp b/src/shadowcascades.cpp index 1bbda03ba31..c36cc6a3279 100644 --- a/src/shadowcascades.cpp +++ b/src/shadowcascades.cpp @@ -66,7 +66,7 @@ void calculateShadowCascades(const iView *player, float terrainDistance, const g float pitch = UNDEG(-player->r.x); - float adjustedZFar = (pow((1.57f - pitch) / 1.57f, 0.9f) * 4000.f) + 2000.f + terrainDistance; + float adjustedZFar = static_cast((pow((1.57f - pitch) / 1.57f, 0.9f) * 4000.f) + 2000.f + terrainDistance); std::vector cascadeSplits(SHADOW_MAP_CASCADE_COUNT, 0.f);