diff options
author | Glenn Kasten <gkasten@google.com> | 2012-02-08 14:04:28 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-02-14 09:06:20 -0800 |
commit | 8d6a2449a91f5116d7243ab039393195ebd663fe (patch) | |
tree | a4ac36a5ff020ac5e730a6ec7feaebfd2a14acad /services/audioflinger/AudioPolicyService.cpp | |
parent | 6dbc1359f778575d09d6da722b060a6d72c2e7c5 (diff) | |
download | frameworks_av-8d6a2449a91f5116d7243ab039393195ebd663fe.zip frameworks_av-8d6a2449a91f5116d7243ab039393195ebd663fe.tar.gz frameworks_av-8d6a2449a91f5116d7243ab039393195ebd663fe.tar.bz2 |
Use size_t and ssize_t with Vector
Use size_t with size() and ssize_t with indexOfKey(). Exception:
use ssize_t for backwards loops, and indices that are overloaded as a
marker or error code.
Change-Id: Ibf2a360af4539b72b09c818dda22ea2a0de92431
Diffstat (limited to 'services/audioflinger/AudioPolicyService.cpp')
-rw-r--r-- | services/audioflinger/AudioPolicyService.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp index 21b5811..041b5a8 100644 --- a/services/audioflinger/AudioPolicyService.cpp +++ b/services/audioflinger/AudioPolicyService.cpp @@ -768,7 +768,7 @@ status_t AudioPolicyService::AudioCommandThread::dump(int fd) snprintf(buffer, SIZE, "- Commands:\n"); result = String8(buffer); result.append(" Command Time Wait pParam\n"); - for (int i = 0; i < (int)mAudioCommands.size(); i++) { + for (size_t i = 0; i < mAudioCommands.size(); i++) { mAudioCommands[i]->dump(buffer, SIZE); result.append(buffer); } @@ -902,7 +902,7 @@ status_t AudioPolicyService::AudioCommandThread::voiceVolumeCommand(float volume // insertCommand_l() must be called with mLock held void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *command, int delayMs) { - ssize_t i; + ssize_t i; // not size_t because i will count down to -1 Vector <AudioCommand *> removedCommands; command->mTime = systemTime() + milliseconds(delayMs); |