AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.4k stars 276 forks source link

Fix sign-compare warning when compiling with GCC 14 #1749

Closed JeanChristopheMorinPerso closed 1 month ago

JeanChristopheMorinPerso commented 1 month ago

Simple pull request to remove a new warning under GCC 14.

The warning is

/home/jcmorin/jcmenv/aswf/OpenTimelineIO/src/opentimelineio/stackAlgorithm.cpp: In function ‘void opentimelineio::v1_0::_normalize_tracks_lengths(std::vector<Track*>&, TrackRetainerVector&, ErrorStatus*)’:
/home/jcmorin/jcmenv/aswf/OpenTimelineIO/src/opentimelineio/stackAlgorithm.cpp:147:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<opentimelineio::v1_0::Track*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  147 |     for (int i = 0; i < tracks.size(); i++)
      |                     ~~^~~~~~~~~~~~~~~