FastPath: Update for clang tidy
Clean for clang-tidy.
Test: ALLOW_LOCAL_TIDY_TRUE=1 mm -j .
Bug: 284390461
Merged-In: Ie46c1f5c4ba6ad397f345c6904c567bcbf5b82ae
Change-Id: Ie46c1f5c4ba6ad397f345c6904c567bcbf5b82ae
diff --git a/services/audioflinger/fastpath/FastThreadDumpState.h b/services/audioflinger/fastpath/FastThreadDumpState.h
index 0b20e55..63e81d3 100644
--- a/services/audioflinger/fastpath/FastThreadDumpState.h
+++ b/services/audioflinger/fastpath/FastThreadDumpState.h
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-#ifndef ANDROID_AUDIO_FAST_THREAD_DUMP_STATE_H
-#define ANDROID_AUDIO_FAST_THREAD_DUMP_STATE_H
+#pragma once
+
+#include <type_traits>
#include "Configuration.h"
#include "FastThreadState.h"
@@ -30,7 +31,6 @@
// It has a different lifetime than the FastThread, and so it can't be a member of FastThread.
struct FastThreadDumpState {
FastThreadDumpState();
- /*virtual*/ ~FastThreadDumpState();
FastThreadState::Command mCommand; // current command
uint32_t mUnderruns; // total number of underruns
@@ -67,6 +67,7 @@
}; // struct FastThreadDumpState
-} // namespace android
+// No virtuals.
+static_assert(!std::is_polymorphic_v<FastThreadDumpState>);
-#endif // ANDROID_AUDIO_FAST_THREAD_DUMP_STATE_H
+} // namespace android