Remove unnecessary std::move
Moving a temporary object prevents copy elision, and could reduce
performance.
This fixes -Wpessimizing-move compiler warning.
Test: presubmit
Bug: 154270751
Change-Id: Ia0b02d90c239572c953007272f75900ee77c6305
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 1f4e16e..3ef23e4 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -4491,7 +4491,7 @@
// TODO(b/184194057): Use the vibrator information from the vibrator that will be used
// for the HapticGenerator.
const std::optional<media::AudioVibratorInfo> defaultVibratorInfo =
- std::move(getDefaultVibratorInfo_l());
+ getDefaultVibratorInfo_l();
if (defaultVibratorInfo) {
// Only set the vibrator info when it is a valid one.
audio_utils::lock_guard _cl(chain->mutex());