Silence some MSVC2015 specific warnings.

This commit is contained in:
Tsuda Kageyu 2015-07-31 12:23:01 +09:00
parent c9963af848
commit 5ad69a81dc
3 changed files with 4 additions and 4 deletions

View File

@ -59,12 +59,12 @@ MP4::Atom::Atom(File *file)
if(length == 1) {
const long long longLength = file->readBlock(8).toLongLong();
if(sizeof(long) == sizeof(long long)) {
length = longLength;
length = static_cast<long>(longLength);
}
else {
if(longLength <= LONG_MAX) {
// The atom has a 64-bit length, but it's actually a 31-bit value
length = (long)longLength;
length = static_cast<long>(longLength);
}
else {
debug("MP4: 64-bit atoms are not supported");

View File

@ -263,7 +263,7 @@ void ChapterFrame::parseFields(const ByteVector &data)
return;
while((uint)embPos < size - header()->size()) {
Frame *frame = FrameFactory::instance()->createFrame(data.mid(pos + embPos), d->tagHeader);
Frame *frame = FrameFactory::instance()->createFrame(data.mid(pos + embPos), (d->tagHeader != 0));
if(!frame)
return;

View File

@ -286,7 +286,7 @@ void TableOfContentsFrame::parseFields(const ByteVector &data)
return;
while(embPos < size - header()->size()) {
Frame *frame = FrameFactory::instance()->createFrame(data.mid(pos + embPos), d->tagHeader);
Frame *frame = FrameFactory::instance()->createFrame(data.mid(pos + embPos), (d->tagHeader != 0));
if(!frame)
return;