Skip to content

Commit 03ee306

Browse files
authored
Use auto * where appropriate (#719)
1 parent cddec0f commit 03ee306

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Sources/CSFBAudioEngine/Player/AudioPlayer.mm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ bool PerformSeek() noexcept
605605
SFB::AudioPlayer::Decoder SFB::AudioPlayer::CurrentDecoder() const noexcept
606606
{
607607
std::lock_guard lock{activeDecodersLock_};
608-
const auto decoderState = FirstActiveDecoderState();
608+
const auto *decoderState = FirstActiveDecoderState();
609609
if(!decoderState)
610610
return nil;
611611
return decoderState->decoder_;
@@ -633,7 +633,7 @@ bool PerformSeek() noexcept
633633
SFBPlaybackPosition SFB::AudioPlayer::PlaybackPosition() const noexcept
634634
{
635635
std::lock_guard lock{activeDecodersLock_};
636-
const auto decoderState = FirstActiveDecoderState();
636+
const auto *decoderState = FirstActiveDecoderState();
637637
if(!decoderState)
638638
return SFBInvalidPlaybackPosition;
639639
return { .framePosition = decoderState->FramePosition(), .frameLength = decoderState->FrameLength() };
@@ -643,7 +643,7 @@ bool PerformSeek() noexcept
643643
{
644644
std::lock_guard lock{activeDecodersLock_};
645645

646-
const auto decoderState = FirstActiveDecoderState();
646+
const auto *decoderState = FirstActiveDecoderState();
647647
if(!decoderState)
648648
return SFBInvalidPlaybackTime;
649649

@@ -666,7 +666,7 @@ bool PerformSeek() noexcept
666666
{
667667
std::lock_guard lock{activeDecodersLock_};
668668

669-
const auto decoderState = FirstActiveDecoderState();
669+
const auto *decoderState = FirstActiveDecoderState();
670670
if(!decoderState) {
671671
if(playbackPosition)
672672
*playbackPosition = SFBInvalidPlaybackPosition;
@@ -699,7 +699,7 @@ bool PerformSeek() noexcept
699699
{
700700
std::lock_guard lock{activeDecodersLock_};
701701

702-
const auto decoderState = FirstActiveDecoderState();
702+
auto *decoderState = FirstActiveDecoderState();
703703
if(!decoderState || !decoderState->decoder_.supportsSeeking)
704704
return false;
705705

@@ -723,7 +723,7 @@ bool PerformSeek() noexcept
723723
{
724724
std::lock_guard lock{activeDecodersLock_};
725725

726-
const auto decoderState = FirstActiveDecoderState();
726+
auto *decoderState = FirstActiveDecoderState();
727727
if(!decoderState || !decoderState->decoder_.supportsSeeking)
728728
return false;
729729

@@ -745,7 +745,7 @@ bool PerformSeek() noexcept
745745

746746
std::lock_guard lock{activeDecodersLock_};
747747

748-
const auto decoderState = FirstActiveDecoderState();
748+
auto *decoderState = FirstActiveDecoderState();
749749
if(!decoderState || !decoderState->decoder_.supportsSeeking)
750750
return false;
751751

@@ -762,7 +762,7 @@ bool PerformSeek() noexcept
762762
{
763763
std::lock_guard lock{activeDecodersLock_};
764764

765-
const auto decoderState = FirstActiveDecoderState();
765+
auto *decoderState = FirstActiveDecoderState();
766766
if(!decoderState || !decoderState->decoder_.supportsSeeking)
767767
return false;
768768

@@ -778,7 +778,7 @@ bool PerformSeek() noexcept
778778
bool SFB::AudioPlayer::SupportsSeeking() const noexcept
779779
{
780780
std::lock_guard lock{activeDecodersLock_};
781-
const auto decoderState = FirstActiveDecoderState();
781+
const auto *decoderState = FirstActiveDecoderState();
782782
if(!decoderState)
783783
return false;
784784
return decoderState->decoder_.supportsSeeking;
@@ -1394,7 +1394,7 @@ bool PerformSeek() noexcept
13941394
return;
13951395
}
13961396

1397-
if(const auto decoderState = FirstActiveDecoderState(); decoderState)
1397+
if(const auto *decoderState = FirstActiveDecoderState(); decoderState)
13981398
currentDecoder = decoderState->decoder_;
13991399
}
14001400

0 commit comments

Comments
 (0)