Simplify code
Use DefaultKeyedVector::valueFor to avoid extra test
Make local variables as local as possible
No double parentheses
No typedef for single use
No parentheses around indirect function call
No AudioFlinger:: prefix when not needed
Remove unnecessary casts
Remove block with only one line
Saves 128 bytes
Change-Id: I3a87430eeb01b81e7b81a1c38f6fdd3274ec48f3
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 9396a0b..50712cf 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -766,7 +766,7 @@
virtual status_t start(pid_t tid);
virtual void stop();
bool write(int16_t* data, uint32_t frames);
- bool bufferQueueEmpty() const { return (mBufferQueue.size() == 0) ? true : false; }
+ bool bufferQueueEmpty() const { return mBufferQueue.size() == 0; }
bool isActive() const { return mActive; }
const wp<ThreadBase>& thread() const { return mThread; }
@@ -994,8 +994,8 @@
uint32_t nextUniqueId();
status_t moveEffectChain_l(int sessionId,
- AudioFlinger::PlaybackThread *srcThread,
- AudioFlinger::PlaybackThread *dstThread,
+ PlaybackThread *srcThread,
+ PlaybackThread *dstThread,
bool reRegister);
PlaybackThread *primaryPlaybackThread_l();
uint32_t primaryOutputDevice_l();