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

@@ -115,7 +115,7 @@ class StringReader : public ValueReader<String> {
ByteVector data = file.readBlock(std::min(m_size, limit));
unsigned int count = data.size();
int index = data.find((char)0);
int index = data.find(static_cast<char>(0));
if (index > -1) {
data.resize(index);
}
@@ -481,7 +481,7 @@ void XM::File::read(bool) {
.u16L(bpmSpeed);
unsigned int count = header.read(*this, headerSize - 4U);
unsigned int size = std::min(headerSize - 4U, (unsigned long)header.size());
unsigned int size = std::min(headerSize - 4U, static_cast<unsigned long>(header.size()));
READ_ASSERT(count == size);