Mercurial > hg > orthanc-stone
diff Framework/Fonts/OpenGLTextCoordinates.cpp @ 693:9a474e90e832
Fixed a bunch of truncation warnings in various parts of the library
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 17 May 2019 08:49:55 +0200 |
parents | b098a3aaf694 |
children | 2d8ab34c8c91 |
line wrap: on
line diff
--- a/Framework/Fonts/OpenGLTextCoordinates.cpp Thu May 16 20:39:30 2019 +0200 +++ b/Framework/Fonts/OpenGLTextCoordinates.cpp Fri May 17 08:49:55 2019 +0200 @@ -35,8 +35,8 @@ const Orthanc::IDynamicObject* payload) { // Rendering coordinates - float rx1 = x - box_.GetLeft(); - float ry1 = y - box_.GetTop(); + float rx1 = static_cast<float>(x - box_.GetLeft()); + float ry1 = static_cast<float>(y - box_.GetTop()); float rx2 = rx1 + static_cast<float>(width); float ry2 = ry1 + static_cast<float>(height); @@ -81,8 +81,8 @@ OpenGLTextCoordinates::OpenGLTextCoordinates(const GlyphTextureAlphabet& alphabet, const std::string& utf8) : box_(alphabet.GetAlphabet(), utf8), - textureWidth_(alphabet.GetTextureWidth()), - textureHeight_(alphabet.GetTextureHeight()) + textureWidth_(static_cast<float>(alphabet.GetTextureWidth())), + textureHeight_(static_cast<float>(alphabet.GetTextureHeight())) { if (textureWidth_ <= 0 || textureHeight_ <= 0)