summaryrefslogtreecommitdiff
path: root/slideshow/source
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source')
-rw-r--r--slideshow/source/engine/opengl/TransitionImpl.hxx3
-rw-r--r--slideshow/source/engine/shapes/drawshapesubsetting.cxx8
2 files changed, 7 insertions, 4 deletions
diff --git a/slideshow/source/engine/opengl/TransitionImpl.hxx b/slideshow/source/engine/opengl/TransitionImpl.hxx
index 2e50b8ba5418..2831685cd3a7 100644
--- a/slideshow/source/engine/opengl/TransitionImpl.hxx
+++ b/slideshow/source/engine/opengl/TransitionImpl.hxx
@@ -32,6 +32,7 @@
#include <epoxy/gl.h>
#include <glm/gtc/type_ptr.hpp>
+#include <o3tl/safeint.hxx>
#include <sal/types.h>
#include <limits>
@@ -340,7 +341,7 @@ public:
int getVerticesCount() const
{
- assert(Vertices.size() < unsigned(std::numeric_limits<int>::max()));
+ assert(Vertices.size() < o3tl::make_unsigned(std::numeric_limits<int>::max()));
return int(unsigned(Vertices.size()));
}
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
index 08f2dbba9481..4bc51e2dc08d 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
@@ -17,7 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+#include <o3tl/safeint.hxx>
#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
@@ -85,7 +87,7 @@ namespace slideshow
// action).
const sal_Int32 nIndex( nLastTextActionIndex + pAct->GetValue() );
- ENSURE_OR_THROW( static_cast< ::std::size_t >(nIndex) < maActionClassVector.size(),
+ ENSURE_OR_THROW( o3tl::make_unsigned(nIndex) < maActionClassVector.size(),
"DrawShapeSubsetting::ensureInitializedNodeTree(): sentence index out of range" );
maActionClassVector[ nIndex ] = CLASS_CHARACTER_CELL_END;
@@ -99,7 +101,7 @@ namespace slideshow
// action).
const sal_Int32 nIndex( nLastTextActionIndex + pAct->GetValue() );
- ENSURE_OR_THROW( static_cast< ::std::size_t >(nIndex) < maActionClassVector.size(),
+ ENSURE_OR_THROW( o3tl::make_unsigned(nIndex) < maActionClassVector.size(),
"DrawShapeSubsetting::ensureInitializedNodeTree(): sentence index out of range" );
maActionClassVector[ nIndex ] = CLASS_WORD_END;
@@ -113,7 +115,7 @@ namespace slideshow
// action).
const sal_Int32 nIndex( nLastTextActionIndex + pAct->GetValue() );
- ENSURE_OR_THROW( static_cast< ::std::size_t >(nIndex) < maActionClassVector.size(),
+ ENSURE_OR_THROW( o3tl::make_unsigned(nIndex) < maActionClassVector.size(),
"DrawShapeSubsetting::ensureInitializedNodeTree(): sentence index out of range" );
maActionClassVector[ nIndex ] = CLASS_SENTENCE_END;