Mercurial > hg > orthanc-stone
diff Framework/Fonts/GlyphTextureAlphabet.cpp @ 958:769249e1f3b4
added guards to prevent calling methods on a dead controller (see comment in diff for expl.) + build fix
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 23 Aug 2019 10:16:32 +0200 |
parents | 9a474e90e832 |
children | b9b5d4378874 2d8ab34c8c91 |
line wrap: on
line diff
--- a/Framework/Fonts/GlyphTextureAlphabet.cpp Wed Aug 21 16:24:57 2019 +0200 +++ b/Framework/Fonts/GlyphTextureAlphabet.cpp Fri Aug 23 10:16:32 2019 +0200 @@ -28,9 +28,18 @@ #include <Core/Images/ImageProcessing.h> #include <Core/OrthancException.h> +#ifdef __EMSCRIPTEN__ +/* +Avoid this error: +.../boost/math/special_functions/round.hpp:86:12: warning: implicit conversion from 'std::__2::numeric_limits<int>::type' (aka 'int') to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-int-float-conversion] +.../boost/math/special_functions/round.hpp:93:11: note: in instantiation of function template specialization 'boost::math::iround<float, boost::math::policies::policy<boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> >' requested here +.../orthanc-stone/Framework/Fonts/GlyphTextureAlphabet.cpp:92:28: note: in instantiation of function template specialization 'boost::math::iround<float>' requested here +*/ +#pragma GCC diagnostic ignored "-Wimplicit-int-float-conversion" +#endif + #include <boost/math/special_functions/round.hpp> - namespace OrthancStone { class GlyphTextureAlphabet::GlyphSizeVisitor : public GlyphAlphabet::IGlyphVisitor