Changeset - a377c9d3792c
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-11-07 14:49:30
hy@ozderya.net
use `for` instead of `while`
1 file changed with 1 insertions and 4 deletions:
0 comments (0 inline, 0 general)
dataformatpanel.cpp
Show inline comments
 
@@ -235,16 +235,13 @@ void DataFormatPanel::onDataReady()
 
        (bytesAvailable - (bytesAvailable % packageSize)) / packageSize;
 
    double* channelSamples = new double[numOfPackagesToRead*_numOfChannels];
 

	
 
    // TODO: use `for`, it is for this
 
    int i = 0;
 
    while(i < numOfPackagesToRead)
 
    for (int i = 0; i < numOfPackagesToRead; i++)
 
    {
 
        for (unsigned int ci = 0; ci < _numOfChannels; ci++)
 
        {
 
            // channelSamples[ci].replace(i, (this->*readSample)());
 
            channelSamples[ci*numOfPackagesToRead+i] = (this->*readSample)();
 
        }
 
        i++;
 
    }
 

	
 
    for (unsigned int ci = 0; ci < _numOfChannels; ci++)
0 comments (0 inline, 0 general)