Constructor initialization and const fields
In constructors, initialize member fields in the initialization list
rather than constructor body where possible. This allows more fields
to be const, provided they are never modified.
Also initialize POD fields in constructor, unless it's obvious they
don't need to be initialized. In that case, put a comment instead.
Remove explicit clear() in destructors on fields that are now const.
Give AudioSessionRef a default constructor, so it's immutable fields can
be marked const.
Add comment about ~TrackBase() trick.
Initialize fields in declaration order to make it easier to confirm that
all fields are set.
Move initialization of mHardwareStatus from onFirstRef() to constructor.
Use NULL not 0 to initialize raw pointers in initialization list.
Rename field mClient to mAudioFlingerClient, and getter from client()
to audioFlingerClient().
Change-Id: Ib36cf6ed32f3cd19003f40a5d84046eb4c122052
3 files changed