COMMON: Fix Signed vs. Unsigned GCC Compiler Warning in Cue Sheet Parser

This should now be fixed irrespective of whether size_t is signed or not.
This commit is contained in:
D G Turner 2023-10-15 20:37:16 +01:00
parent 1f51f4b8d6
commit 781fabac28

View File

@ -252,7 +252,7 @@ void CueSheet::parseFilesContext(const char *line) {
if (trackNum < 0 || (_currentTrack > 0 && _currentTrack + 1 != trackNum)) {
warning("CueSheet: Incorrect track number. Expected %d but got %d at line %d", _currentTrack + 1, trackNum, _lineNum);
} else {
for (uint i = _files[_currentFile].tracks.size(); i <= trackNum; i++)
for (int i = (int)_files[_currentFile].tracks.size(); i <= trackNum; i++)
_files[_currentFile].tracks.push_back(CueTrack());
_currentTrack = trackNum;
@ -292,7 +292,7 @@ void CueSheet::parseTracksContext(const char *line) {
int indexNum = atoi(nexttok(s, &s).c_str());
int frames = parseMSF(nexttok(s, &s).c_str());
for (uint i = _files[_currentFile].tracks[_currentTrack].indices.size(); i <= indexNum; i++)
for (int i = (int)_files[_currentFile].tracks[_currentTrack].indices.size(); i <= indexNum; i++)
_files[_currentFile].tracks[_currentTrack].indices.push_back(0);
_files[_currentFile].tracks[_currentTrack].indices[indexNum] = frames;