|
From: <man...@us...> - 2015-03-11 15:36:09
|
Revision: 4865
http://sourceforge.net/p/modplug/code/4865
Author: manxorist
Date: 2015-03-11 15:35:56 +0000 (Wed, 11 Mar 2015)
Log Message:
-----------
[Ref] Silence signed/unsigned comparison warnings.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2015-03-11 15:23:30 UTC (rev 4864)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2015-03-11 15:35:56 UTC (rev 4865)
@@ -2091,7 +2091,7 @@
// with the amount of samples that OpenMPT supports.
WRITEMODULARHEADER('S','E','U','C', 2 + CountOf(sample.cues) * 4);
mpt::IO::WriteIntLE<uint16_t>(f, smp);
- for(int i = 0; i < CountOf(sample.cues); i++)
+ for(std::size_t i = 0; i < CountOf(sample.cues); i++)
{
mpt::IO::WriteIntLE<uint32_t>(f, sample.cues[i]);
}
@@ -2266,7 +2266,7 @@
if(smp > 0 && smp <= GetNumSamples())
{
ModSample &sample = Samples[smp];
- for(int i = 0; i < CountOf(sample.cues); i++)
+ for(std::size_t i = 0; i < CountOf(sample.cues); i++)
{
sample.cues[i] = chunk.ReadUint32LE();
}
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2015-03-11 15:23:30 UTC (rev 4864)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2015-03-11 15:35:56 UTC (rev 4865)
@@ -4711,7 +4711,7 @@
chn.nLength = chn.pModSample->nLength;
offset--;
if(offset == 0) offset = chn.oldOffset;
- else if(offset <= CountOf(chn.pModSample->cues)) offset = chn.oldOffset = chn.pModSample->cues[offset - 1];
+ else if(offset <= static_cast<int>(CountOf(chn.pModSample->cues))) offset = chn.oldOffset = chn.pModSample->cues[offset - 1];
SampleOffset(nChn, offset);
}
}
Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
===================================================================
--- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2015-03-11 15:23:30 UTC (rev 4864)
+++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2015-03-11 15:35:56 UTC (rev 4865)
@@ -73,7 +73,7 @@
// Update loop points if necessary.
if(smp.nLoopStart >= nStartFrom) smp.nLoopStart += nSilenceLength;
if(smp.nLoopEnd >= nStartFrom) smp.nLoopEnd += nSilenceLength;
- for(int i = 0; i < CountOf(smp.cues); i++)
+ for(std::size_t i = 0; i < CountOf(smp.cues); i++)
{
if(smp.cues[i] >= nStartFrom) smp.cues[i] += nSilenceLength;
}
@@ -126,7 +126,7 @@
if(smp.nLoopEnd == 0) smp.uFlags.reset(CHN_LOOP | CHN_PINGPONGLOOP);
if(smp.nSustainEnd == 0) smp.uFlags.reset(CHN_SUSTAINLOOP | CHN_PINGPONGSUSTAIN);
- for(int i = 0; i < CountOf(smp.cues); i++)
+ for(std::size_t i = 0; i < CountOf(smp.cues); i++)
{
Util::DeleteItem(selStart, selEnd - 1, smp.cues[i]);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|