Skip to content

Commit a6df55e

Browse files
committed
Replace C-style casts
1 parent 12df8a3 commit a6df55e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Decoders/SFBDSDIFFDecoder.mm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright (c) 2014 - 2021 Stephen F. Booth <[email protected]>
2+
// Copyright (c) 2014 - 2023 Stephen F. Booth <[email protected]>
33
// Part of https://github.com/sbooth/SFBAudioEngine
44
// MIT license
55
//
@@ -526,7 +526,7 @@ bool ReadChunkIDAndDataSize(SFBInputSource *inputSource, uint32_t& chunkID, uint
526526
return nullptr;
527527
}
528528

529-
if(![inputSource seekToOffset:(offset + (NSInteger)localChunkDataSize) error:nil]) {
529+
if(![inputSource seekToOffset:(offset + static_cast<NSInteger>(localChunkDataSize)) error:nil]) {
530530
os_log_error(gSFBDSDDecoderLog, "Error skipping chunk data");
531531
return nullptr;
532532
}
@@ -565,7 +565,7 @@ bool ReadChunkIDAndDataSize(SFBInputSource *inputSource, uint32_t& chunkID, uint
565565
result->mDataOffset = offset;
566566

567567
// Skip the data
568-
if(![inputSource seekToOffset:(offset + (NSInteger)chunkDataSize) error:nil]) {
568+
if(![inputSource seekToOffset:(offset + static_cast<NSInteger>(chunkDataSize)) error:nil]) {
569569
os_log_error(gSFBDSDDecoderLog, "Error skipping chunk data");
570570
return nullptr;
571571
}
@@ -641,7 +641,7 @@ bool ReadChunkIDAndDataSize(SFBInputSource *inputSource, uint32_t& chunkID, uint
641641
return nullptr;
642642
}
643643

644-
if(![inputSource seekToOffset:(offset + (NSInteger)localChunkDataSize) error:nil]) {
644+
if(![inputSource seekToOffset:(offset + static_cast<NSInteger>(localChunkDataSize)) error:nil]) {
645645
os_log_error(gSFBDSDDecoderLog, "Error skipping chunk data");
646646
return nullptr;
647647
}
@@ -795,7 +795,7 @@ - (BOOL)openReturningError:(NSError **)error
795795
}
796796

797797
_audioOffset = soundDataChunk->mDataOffset;
798-
_packetCount = (AVAudioFramePosition)(soundDataChunk->mDataSize - 12) / (kSFBBytesPerDSDPacketPerChannel * channelsChunk->mNumberChannels);
798+
_packetCount = static_cast<AVAudioFramePosition>(soundDataChunk->mDataSize - 12) / (kSFBBytesPerDSDPacketPerChannel * channelsChunk->mNumberChannels);
799799

800800
if(![_inputSource seekToOffset:_audioOffset error:error])
801801
return NO;

0 commit comments

Comments
 (0)