Fix warnings about unsigned-signed comparison.

This commit is contained in:
Stephen Sinclair
2017-05-11 17:55:07 -03:00
parent 15a2c89f89
commit 071280a311

View File

@@ -338,7 +338,10 @@ StkFrames& StkFrames::getChannel(unsigned int sourceChannel,StkFrames& destinati
#endif
int sourceHop = nChannels_;
int destinationHop = destinationFrames.nChannels_;
for (int i = sourceChannel, j= destinationChannel; i < nFrames_ * nChannels_; i+=sourceHop,j+=destinationHop) {
for (unsigned int i = sourceChannel, j= destinationChannel;
i < nFrames_ * nChannels_;
i+=sourceHop,j+=destinationHop)
{
destinationFrames[j] = data_[i];
}
return destinationFrames;
@@ -366,7 +369,10 @@ void StkFrames::setChannel(unsigned int destinationChannel, const stk::StkFrames
#endif
unsigned int sourceHop = sourceFrames.nChannels_;
unsigned int destinationHop = nChannels_;
for (int i = destinationChannel,j = sourceChannel ; i < nFrames_ * nChannels_; i+=destinationHop,j+=sourceHop) {
for (unsigned int i = destinationChannel,j = sourceChannel;
i < nFrames_ * nChannels_;
i+=destinationHop,j+=sourceHop)
{
data_[i] = sourceFrames[j];
}
}