Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Fix C4018 warnings in pumptool and cuttertool

Anderson Prado2624092e1007
diff --git a/toonz/sources/tnztools/cuttertool.cpp b/toonz/sources/tnztools/cuttertool.cpp
index 2863b8352..1639758fa 100644
--- a/toonz/sources/tnztools/cuttertool.cpp
+++ b/toonz/sources/tnztools/cuttertool.cpp
@@ -461,8 +461,8 @@ public:
TVectorImageP vi = TImageP(getImage(false));
if (!vi) return false;
- if (m_lockedStrokeIndex >= vi->getStrokeCount()) {
- m_lockedStrokeIndex = -1;
+ if (m_lockedStrokeIndex >= static_cast<int>(vi->getStrokeCount())) {
+ m_lockedStrokeIndex = -1;
}
if (lock && m_lockedStrokeIndex >= 0) {
@@ -487,4 +487,4 @@ public:
} // namespace
//-----------------------------------------------------------------------------
-// TTool *getCutterTool() {return &cutterTool;}
+// TTool *getCutterTool() {return &cutterTool;}
\ No newline at end of file
diff --git a/toonz/sources/tnztools/pumptool.cpp b/toonz/sources/tnztools/pumptool.cpp
index c2192d8ce..72e745496 100644
--- a/toonz/sources/tnztools/pumptool.cpp
+++ b/toonz/sources/tnztools/pumptool.cpp
@@ -775,7 +775,7 @@ bool PumpTool::getNearestStrokeWithLock(const TPointD &p, double &outW,
TVectorImageP vi = TImageP(getImage(false));
if (!vi) return false;
- if (m_lockedStrokeIndex >= vi->getStrokeCount()) {
+ if (m_lockedStrokeIndex >= static_cast<int>(vi->getStrokeCount())) {
m_lockedStrokeIndex = -1;
}
@@ -793,4 +793,4 @@ bool PumpTool::getNearestStrokeWithLock(const TPointD &p, double &outW,
}
return false;
-}
+}
\ No newline at end of file