From a852d2bcd70e91d2ecc25d6659459d538a366b5d Mon Sep 17 00:00:00 2001 From: Jean-Christophe Morin Date: Wed, 15 May 2024 20:41:30 -0400 Subject: [PATCH 1/2] Fix sign-compare warning when compiling with GCC 14 Signed-off-by: Jean-Christophe Morin --- src/opentimelineio/stackAlgorithm.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/opentimelineio/stackAlgorithm.cpp b/src/opentimelineio/stackAlgorithm.cpp index 5bdf45b85..596e2a366 100644 --- a/src/opentimelineio/stackAlgorithm.cpp +++ b/src/opentimelineio/stackAlgorithm.cpp @@ -7,6 +7,8 @@ #include "opentimelineio/trackAlgorithm.h" #include "opentimelineio/transition.h" +#include + namespace opentimelineio { namespace OPENTIMELINEIO_VERSION { typedef std::map> RangeTrackMap; @@ -144,7 +146,7 @@ _normalize_tracks_lengths( } } - for (int i = 0; i < tracks.size(); i++) + for (std::size_t i = 0; i < tracks.size(); i++) { Track* old_track = tracks[i]; RationalTime track_duration = old_track->duration(error_status); From ed4ddb638daefe44523e517ff5a4eff5121f329a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Morin Date: Fri, 17 May 2024 14:12:24 -0400 Subject: [PATCH 2/2] Use C size_t instead of C++ std::size_t Signed-off-by: Jean-Christophe Morin --- src/opentimelineio/stackAlgorithm.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/opentimelineio/stackAlgorithm.cpp b/src/opentimelineio/stackAlgorithm.cpp index 596e2a366..c8b60abbb 100644 --- a/src/opentimelineio/stackAlgorithm.cpp +++ b/src/opentimelineio/stackAlgorithm.cpp @@ -7,8 +7,6 @@ #include "opentimelineio/trackAlgorithm.h" #include "opentimelineio/transition.h" -#include - namespace opentimelineio { namespace OPENTIMELINEIO_VERSION { typedef std::map> RangeTrackMap; @@ -146,7 +144,7 @@ _normalize_tracks_lengths( } } - for (std::size_t i = 0; i < tracks.size(); i++) + for (size_t i = 0; i < tracks.size(); i++) { Track* old_track = tracks[i]; RationalTime track_duration = old_track->duration(error_status);