Replace use of C style casts
This commit is contained in:
4
3rdparty/taglib/asf/asfattribute.cpp
vendored
4
3rdparty/taglib/asf/asfattribute.cpp
vendored
@@ -282,7 +282,7 @@ ByteVector ASF::Attribute::render(const String &name, int kind) const {
|
||||
|
||||
if (kind == 0) {
|
||||
data = renderString(name, true) +
|
||||
ByteVector::fromShort((int)d->type, false) +
|
||||
ByteVector::fromShort(static_cast<int>(d->type), false) +
|
||||
ByteVector::fromShort(data.size(), false) +
|
||||
data;
|
||||
}
|
||||
@@ -291,7 +291,7 @@ ByteVector ASF::Attribute::render(const String &name, int kind) const {
|
||||
data = ByteVector::fromShort(kind == 2 ? d->language : 0, false) +
|
||||
ByteVector::fromShort(d->stream, false) +
|
||||
ByteVector::fromShort(nameData.size(), false) +
|
||||
ByteVector::fromShort((int)d->type, false) +
|
||||
ByteVector::fromShort(static_cast<int>(d->type), false) +
|
||||
ByteVector::fromUInt(data.size(), false) +
|
||||
nameData +
|
||||
data;
|
||||
|
||||
6
3rdparty/taglib/asf/asffile.cpp
vendored
6
3rdparty/taglib/asf/asffile.cpp
vendored
@@ -179,7 +179,7 @@ class ASF::File::FilePrivate::CodecListObject : public ASF::File::FilePrivate::B
|
||||
void ASF::File::FilePrivate::BaseObject::parse(ASF::File *file, unsigned int size) {
|
||||
|
||||
data.clear();
|
||||
if (size > 24 && size <= (unsigned int)(file->length()))
|
||||
if (size > 24 && size <= static_cast<unsigned int>(file->length()))
|
||||
data = file->readBlock(size - 24);
|
||||
else
|
||||
data = ByteVector();
|
||||
@@ -384,7 +384,7 @@ void ASF::File::FilePrivate::HeaderExtensionObject::parse(ASF::File *file, unsig
|
||||
else {
|
||||
obj = new UnknownObject(guid);
|
||||
}
|
||||
obj->parse(file, (unsigned int)size);
|
||||
obj->parse(file, static_cast<unsigned int>(size));
|
||||
objects.append(obj);
|
||||
dataPos += size;
|
||||
}
|
||||
@@ -632,7 +632,7 @@ void ASF::File::read() {
|
||||
setValid(false);
|
||||
break;
|
||||
}
|
||||
long size = (long)readQWORD(this, &ok);
|
||||
long size = static_cast<long>(readQWORD(this, &ok));
|
||||
if (!ok) {
|
||||
setValid(false);
|
||||
break;
|
||||
|
||||
4
3rdparty/taglib/asf/asfpicture.cpp
vendored
4
3rdparty/taglib/asf/asfpicture.cpp
vendored
@@ -117,7 +117,7 @@ ByteVector ASF::Picture::render() const {
|
||||
if (!isValid())
|
||||
return ByteVector();
|
||||
|
||||
return ByteVector((char)d->type) +
|
||||
return ByteVector(static_cast<char>(d->type)) +
|
||||
ByteVector::fromUInt(d->picture.size(), false) +
|
||||
renderString(d->mimeType) +
|
||||
renderString(d->description) +
|
||||
@@ -131,7 +131,7 @@ void ASF::Picture::parse(const ByteVector &bytes) {
|
||||
if (bytes.size() < 9)
|
||||
return;
|
||||
int pos = 0;
|
||||
d->type = (Type)bytes[0];
|
||||
d->type = static_cast<Type>(bytes[0]);
|
||||
++pos;
|
||||
const unsigned int dataLen = bytes.toUInt(pos, false);
|
||||
pos += 4;
|
||||
|
||||
Reference in New Issue
Block a user