Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 21, 2015, 7:05:53 PM (8 years ago)
Author:
muemart
Message:

Run clang-modernize -loop-convert

  • Again, not all possible loops were converted
  • It can do pretty cool transformations, but I had to fix a few compile errors, so there might be some runtime errors lurking around too
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc

    r10765 r10821  
    6868        int current_section;
    6969
    70         for(int i = 0; i < 4; i++)
     70        for(auto & initbuffer : initbuffers)
    7171        {
    7272            long ret = ov_read(&vf, inbuffer, sizeof(inbuffer), 0, 2, 1, &current_section);
     
    8282            }
    8383
    84             alBufferData(initbuffers[i], format, &inbuffer, ret, vorbisInfo->rate);
     84            alBufferData(initbuffer, format, &inbuffer, ret, vorbisInfo->rate);
    8585        }
    8686        alSourceQueueBuffers(audioSource, 4, initbuffers);
Note: See TracChangeset for help on using the changeset viewer.