canvas/source/opengl/ogl_spritedevicehelper.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit ee2199a4356c9a74b4a3e817f7aef268efba5123 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Fri May 14 10:25:09 2021 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Fri May 14 15:56:58 2021 +0200 Directly initialize vectors in ogl_spritedevicehelper.cxx since we've got all the information from the beginning. static_cast were needed to avoid this kind of error: /home/julien/lo/libreoffice/canvas/source/opengl/ogl_spritedevicehelper.cxx:305:36: error: non-constant-expression cannot be narrowed from type 'sal_uInt32' (aka 'unsigned int') to 'double' in initializer list [-Wc++11-narrowing] mpTextureCache->getCacheMissCount(), mpTextureCache->getCacheHitCount() } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/julien/lo/libreoffice/canvas/source/opengl/ogl_spritedevicehelper.cxx:305:36: note: insert an explicit cast to silence this issue mpTextureCache->getCacheMissCount(), mpTextureCache->getCacheHitCount() } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast<double>( ) Change-Id: If2705251cc4a246c2b8cb0bf873d413b3c572880 Change-Id: Ie1ce45cb6518fe97442ec5f3f05d34bae586b417 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115585 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx index bcca03d0bd45..7e838162e6c3 100644 --- a/canvas/source/opengl/ogl_spritedevicehelper.cxx +++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx @@ -301,11 +301,10 @@ namespace oglcanvas maLastUpdate.reset(); const double fps(denominator == 0.0 ? 100.0 : 1.0/denominator); - std::vector<double> aVec; aVec.push_back(fps); - aVec.push_back(maActiveSprites.size()); - aVec.push_back(mpTextureCache->getCacheSize()); - aVec.push_back(mpTextureCache->getCacheMissCount()); - aVec.push_back(mpTextureCache->getCacheHitCount()); + std::vector<double> aVec { fps, static_cast<double>(maActiveSprites.size()), + static_cast<double>(mpTextureCache->getCacheSize()), + static_cast<double>(mpTextureCache->getCacheMissCount()), + static_cast<double>(mpTextureCache->getCacheHitCount()) }; renderOSD( aVec, 20 ); /* _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits