]> granicus.if.org Git - taglib/commitdiff
Silence some MSVC2015 specific warnings.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Fri, 31 Jul 2015 03:23:01 +0000 (12:23 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Fri, 31 Jul 2015 03:23:01 +0000 (12:23 +0900)
taglib/mp4/mp4atom.cpp
taglib/mpeg/id3v2/frames/chapterframe.cpp
taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp

index bd9c7b1695986a993a285b67e7dd992a219563b2..5e94690f5f82cbbdf6c2f8fef2d0fb97af1c7fca 100644 (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");
index 6024ca7e4c022d2b5bc77dccedb98f87d9733b34..a424cb3c4f2611ebc60f343113998821e5ad5c21 100644 (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;
index 5a9bf791c3e35cfcce6edc590867200f8cd5ced5..bdcc11830e10a6062de5fddd06a5d5a024f4bc84 100644 (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;