comparison 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
comparison
equal deleted inserted replaced
692:10910827f235 693:9a474e90e832
87 glyphMaxWidth_(glyphMaxWidth), 87 glyphMaxWidth_(glyphMaxWidth),
88 glyphMaxHeight_(glyphMaxHeight), 88 glyphMaxHeight_(glyphMaxHeight),
89 column_(0), 89 column_(0),
90 row_(0) 90 row_(0)
91 { 91 {
92 int c = boost::math::iround<int>(sqrt(static_cast<float>(countGlyphs))); 92 int c = boost::math::iround<float>(sqrt(static_cast<float>(countGlyphs)));
93 93
94 if (c <= 0) 94 if (c <= 0)
95 { 95 {
96 countColumns_ = 1; 96 countColumns_ = 1;
97 } 97 }
237 { 237 {
238 GlyphSizeVisitor size; 238 GlyphSizeVisitor size;
239 sourceAlphabet.GetAlphabet().Apply(size); 239 sourceAlphabet.GetAlphabet().Apply(size);
240 240
241 TextureGenerator generator(alphabet_, 241 TextureGenerator generator(alphabet_,
242 sourceAlphabet.GetAlphabet().GetSize(), 242 static_cast<unsigned int>(sourceAlphabet.GetAlphabet().GetSize()),
243 size.GetMaxWidth(), 243 size.GetMaxWidth(),
244 size.GetMaxHeight()); 244 size.GetMaxHeight());
245 sourceAlphabet.GetAlphabet().Apply(generator); 245 sourceAlphabet.GetAlphabet().Apply(generator);
246 246
247 texture_.reset(generator.ReleaseTexture()); 247 texture_.reset(generator.ReleaseTexture());
248 textureWidth_ = texture_->GetWidth(); 248 textureWidth_ = texture_->GetWidth();
249 textureHeight_ = texture_->GetHeight(); 249 textureHeight_ = texture_->GetHeight();