changeset 1280:c97a28a3baeb 3.0-integration

Trivial loop reordering for sequential index
author Chris Cannam
date Wed, 23 Nov 2016 10:34:30 +0000
parents 0a9193dc136b
children 6463046bd21d
files data/model/ReadOnlyWaveFileModel.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/model/ReadOnlyWaveFileModel.cpp	Tue Nov 22 16:40:41 2016 +0000
+++ b/data/model/ReadOnlyWaveFileModel.cpp	Wed Nov 23 10:34:30 2016 +0000
@@ -234,8 +234,8 @@
         }
     } else {
         // channel == -1, mix down all channels
-        for (int c = 0; c < channels; ++c) {
-            for (int i = 0; i < obtained; ++i) {
+        for (int i = 0; i < obtained; ++i) {
+            for (int c = 0; c < channels; ++c) {
                 result[i] += interleaved[i * channels + c];
             }
         }