FastPath: More clang-tidy optimizations
use-default-member-init
Test: ALLOW_LOCAL_TIDY_TRUE=1 mm -j .
Test: atest AudioTrackTest AudioRecordTest
Bug: 284390461
Merged-In: I4b5570bcbe3d4c3df890d87f547bab1de3c62187
Change-Id: I4b5570bcbe3d4c3df890d87f547bab1de3c62187
(cherry picked from commit 87e740a67f3ebac577635cd321ba7a88c65d1f0f)
diff --git a/services/audioflinger/fastpath/FastCapture.cpp b/services/audioflinger/fastpath/FastCapture.cpp
index 5c76649..288036d 100644
--- a/services/audioflinger/fastpath/FastCapture.cpp
+++ b/services/audioflinger/fastpath/FastCapture.cpp
@@ -30,17 +30,13 @@
namespace android {
-/*static*/ const FastCaptureState FastCapture::sInitial;
+/*static*/ const FastCaptureState FastCapture::sInitial{};
-FastCapture::FastCapture() : FastThread("cycleC_ms", "loadC_us"),
- mInputSource(nullptr), mInputSourceGen(0), mPipeSink(nullptr), mPipeSinkGen(0),
- mReadBuffer(nullptr), mReadBufferState(-1), mFormat(Format_Invalid), mSampleRate(0),
- // mDummyDumpState
- mTotalNativeFramesRead(0)
+FastCapture::FastCapture() : FastThread("cycleC_ms", "loadC_us")
{
+ // base class initialization
mPrevious = &sInitial;
mCurrent = &sInitial;
-
mDummyDumpState = &mDummyFastCaptureDumpState;
}