From 071280a311f53ff24c1025291ae8be28b198130e Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Thu, 11 May 2017 17:55:07 -0300 Subject: [PATCH] Fix warnings about unsigned-signed comparison. --- src/Stk.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Stk.cpp b/src/Stk.cpp index 65ff9a5..b76469f 100644 --- a/src/Stk.cpp +++ b/src/Stk.cpp @@ -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]; } }