Mercurial > hg > orthanc-stone
diff Framework/Fonts/GlyphTextureAlphabet.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 | 769249e1f3b4 |
line wrap: on
line diff
--- a/Framework/Fonts/GlyphTextureAlphabet.cpp Thu May 16 20:39:30 2019 +0200 +++ b/Framework/Fonts/GlyphTextureAlphabet.cpp Fri May 17 08:49:55 2019 +0200 @@ -89,7 +89,7 @@ column_(0), row_(0) { - int c = boost::math::iround<int>(sqrt(static_cast<float>(countGlyphs))); + int c = boost::math::iround<float>(sqrt(static_cast<float>(countGlyphs))); if (c <= 0) { @@ -239,9 +239,9 @@ sourceAlphabet.GetAlphabet().Apply(size); TextureGenerator generator(alphabet_, - sourceAlphabet.GetAlphabet().GetSize(), - size.GetMaxWidth(), - size.GetMaxHeight()); + static_cast<unsigned int>(sourceAlphabet.GetAlphabet().GetSize()), + size.GetMaxWidth(), + size.GetMaxHeight()); sourceAlphabet.GetAlphabet().Apply(generator); texture_.reset(generator.ReleaseTexture());