Replace use of C style casts

This commit is contained in:
Jonas Kvinge
2020-06-15 17:59:02 +02:00
parent a68c249d4e
commit 72ede666d4
35 changed files with 105 additions and 111 deletions

View File

@@ -116,12 +116,12 @@ bool S3M::File::save() {
StringList lines = d->tag.comment().split("\n");
// write comment as sample names:
for (unsigned short i = 0; i < sampleCount; ++i) {
seek(96L + length + ((long)i << 1));
seek(96L + length + (static_cast<long>(i) << 1));
unsigned short instrumentOffset = 0;
if (!readU16L(instrumentOffset))
return false;
seek(((long)instrumentOffset << 4) + 48);
seek((static_cast<long>(instrumentOffset) << 4) + 48);
if (i < lines.size())
writeString(lines[i], 27);
@@ -202,10 +202,10 @@ void S3M::File::read(bool) {
// instead samples (SCRS).
StringList comment;
for (unsigned short i = 0; i < sampleCount; ++i) {
seek(96L + length + ((long)i << 1));
seek(96L + length + (static_cast<long>(i) << 1));
READ_U16L_AS(sampleHeaderOffset);
seek((long)sampleHeaderOffset << 4);
seek(static_cast<long>(sampleHeaderOffset) << 4);
READ_BYTE_AS(sampleType);
READ_STRING_AS(dosFileName, 13);