aboutsummaryrefslogtreecommitdiffstats
path: root/utils/makemhr/loaddef.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-26 00:02:23 -0800
committerChris Robinson <[email protected]>2023-12-26 02:21:35 -0800
commit1fddc044ac765d00e64628e59edcbcd71f0046b1 (patch)
tree9e6734e0527bd418a4775c7d41c3b6a25ca4eb41 /utils/makemhr/loaddef.cpp
parent095d1964feacaa4ec253db028fb1e8c04f718511 (diff)
Clean up some gotos and non-optimal casts
Diffstat (limited to 'utils/makemhr/loaddef.cpp')
-rw-r--r--utils/makemhr/loaddef.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/makemhr/loaddef.cpp b/utils/makemhr/loaddef.cpp
index b33dbc75..05bcfd2e 100644
--- a/utils/makemhr/loaddef.cpp
+++ b/utils/makemhr/loaddef.cpp
@@ -907,7 +907,8 @@ static int ReadWaveList(std::istream &istream, const SourceRefT *src, const Byte
fprintf(stderr, "\nError: Bad read from file '%s'.\n", src->mPath.data());
return 0;
}
- istream.seekg(static_cast<long>(src->mOffset * block), std::ios::cur);
+ using off_type = std::istream::off_type;
+ istream.seekg(off_type(src->mOffset) * off_type(block), std::ios::cur);
if(!ReadWaveData(istream, src, order, n, &hrir[0]))
return 0;
return 1;
@@ -939,7 +940,8 @@ static int ReadWaveList(std::istream &istream, const SourceRefT *src, const Byte
count = chunkSize / block;
if(count > skip)
{
- istream.seekg(static_cast<long>(skip * block), std::ios::cur);
+ using off_type = std::istream::off_type;
+ istream.seekg(off_type(skip) * off_type(block), std::ios::cur);
chunkSize -= skip * block;
count -= skip;
skip = 0;