Use a standard type rather than TagLib::uchar.

This won't break the ABI compatibility.
This commit is contained in:
Tsuda Kageyu
2015-12-02 18:11:52 +09:00
parent 2cb89b85c9
commit 8bdddaabce
32 changed files with 131 additions and 130 deletions

View File

@ -211,12 +211,12 @@ public:
CPPUNIT_ASSERT_EQUAL((unsigned short)0xFF01, ByteVector("\xFF\x01", 2).toUShort());
CPPUNIT_ASSERT_EQUAL((unsigned short)0x01FF, ByteVector("\xFF\x01", 2).toUShort(false));
const uchar PI32LE[] = { 0x00, 0xdb, 0x0f, 0x49, 0x40 };
const uchar PI32BE[] = { 0x00, 0x40, 0x49, 0x0f, 0xdb };
const uchar PI64LE[] = { 0x00, 0x18, 0x2d, 0x44, 0x54, 0xfb, 0x21, 0x09, 0x40 };
const uchar PI64BE[] = { 0x00, 0x40, 0x09, 0x21, 0xfb, 0x54, 0x44, 0x2d, 0x18 };
const uchar PI80LE[] = { 0x00, 0x00, 0xc0, 0x68, 0x21, 0xa2, 0xda, 0x0f, 0xc9, 0x00, 0x40 };
const uchar PI80BE[] = { 0x00, 0x40, 0x00, 0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc0, 0x00 };
const unsigned char PI32LE[] = { 0x00, 0xdb, 0x0f, 0x49, 0x40 };
const unsigned char PI32BE[] = { 0x00, 0x40, 0x49, 0x0f, 0xdb };
const unsigned char PI64LE[] = { 0x00, 0x18, 0x2d, 0x44, 0x54, 0xfb, 0x21, 0x09, 0x40 };
const unsigned char PI64BE[] = { 0x00, 0x40, 0x09, 0x21, 0xfb, 0x54, 0x44, 0x2d, 0x18 };
const unsigned char PI80LE[] = { 0x00, 0x00, 0xc0, 0x68, 0x21, 0xa2, 0xda, 0x0f, 0xc9, 0x00, 0x40 };
const unsigned char PI80BE[] = { 0x00, 0x40, 0x00, 0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc0, 0x00 };
ByteVector pi32le(reinterpret_cast<const char*>(PI32LE), 5);
CPPUNIT_ASSERT_EQUAL(31415, static_cast<int>(pi32le.toFloat32LE(1) * 10000));

View File

@ -338,7 +338,7 @@ public:
CPPUNIT_ASSERT_EQUAL(String("ident"), f.identification());
CPPUNIT_ASSERT_EQUAL(15.0f / 512.0f,
f.volumeAdjustment(ID3v2::RelativeVolumeFrame::FrontRight));
CPPUNIT_ASSERT_EQUAL((uchar)8,
CPPUNIT_ASSERT_EQUAL((unsigned char)8,
f.peakVolume(ID3v2::RelativeVolumeFrame::FrontRight).bitsRepresentingPeak);
CPPUNIT_ASSERT_EQUAL(ByteVector("\x45"),
f.peakVolume(ID3v2::RelativeVolumeFrame::FrontRight).peakVolume);

View File

@ -116,12 +116,12 @@ private:
CPPUNIT_ASSERT_EQUAL((TagLib::ushort)535, p->version());
CPPUNIT_ASSERT_EQUAL((TagLib::ushort)532, p->compatibleVersion());
CPPUNIT_ASSERT_EQUAL((TagLib::ushort) 9, p->flags());
CPPUNIT_ASSERT_EQUAL((TagLib::uchar)128, p->globalVolume());
CPPUNIT_ASSERT_EQUAL((TagLib::uchar) 48, p->mixVolume());
CPPUNIT_ASSERT_EQUAL((TagLib::uchar)125, p->tempo());
CPPUNIT_ASSERT_EQUAL((TagLib::uchar) 6, p->bpmSpeed());
CPPUNIT_ASSERT_EQUAL((TagLib::uchar)128, p->panningSeparation());
CPPUNIT_ASSERT_EQUAL((TagLib::uchar) 0, p->pitchWheelDepth());
CPPUNIT_ASSERT_EQUAL((unsigned char)128, p->globalVolume());
CPPUNIT_ASSERT_EQUAL((unsigned char) 48, p->mixVolume());
CPPUNIT_ASSERT_EQUAL((unsigned char)125, p->tempo());
CPPUNIT_ASSERT_EQUAL((unsigned char) 6, p->bpmSpeed());
CPPUNIT_ASSERT_EQUAL((unsigned char)128, p->panningSeparation());
CPPUNIT_ASSERT_EQUAL((unsigned char) 0, p->pitchWheelDepth());
CPPUNIT_ASSERT_EQUAL(title, t->title());
CPPUNIT_ASSERT_EQUAL(String(), t->artist());
CPPUNIT_ASSERT_EQUAL(String(), t->album());

View File

@ -111,7 +111,7 @@ private:
CPPUNIT_ASSERT_EQUAL(0, p->sampleRate());
CPPUNIT_ASSERT_EQUAL(8, p->channels());
CPPUNIT_ASSERT_EQUAL(31U, p->instrumentCount());
CPPUNIT_ASSERT_EQUAL((uchar)1, p->lengthInPatterns());
CPPUNIT_ASSERT_EQUAL((unsigned char)1, p->lengthInPatterns());
CPPUNIT_ASSERT_EQUAL(title, t->title());
CPPUNIT_ASSERT_EQUAL(String(), t->artist());
CPPUNIT_ASSERT_EQUAL(String(), t->album());

View File

@ -105,10 +105,10 @@ private:
CPPUNIT_ASSERT_EQUAL((TagLib::ushort) 0, p->flags());
CPPUNIT_ASSERT_EQUAL((TagLib::ushort)4896, p->trackerVersion());
CPPUNIT_ASSERT_EQUAL((TagLib::ushort) 2, p->fileFormatVersion());
CPPUNIT_ASSERT_EQUAL((TagLib::uchar) 64, p->globalVolume());
CPPUNIT_ASSERT_EQUAL((TagLib::uchar) 48, p->masterVolume());
CPPUNIT_ASSERT_EQUAL((TagLib::uchar)125, p->tempo());
CPPUNIT_ASSERT_EQUAL((TagLib::uchar) 6, p->bpmSpeed());
CPPUNIT_ASSERT_EQUAL((unsigned char) 64, p->globalVolume());
CPPUNIT_ASSERT_EQUAL((unsigned char) 48, p->masterVolume());
CPPUNIT_ASSERT_EQUAL((unsigned char)125, p->tempo());
CPPUNIT_ASSERT_EQUAL((unsigned char) 6, p->bpmSpeed());
CPPUNIT_ASSERT_EQUAL(title, t->title());
CPPUNIT_ASSERT_EQUAL(String(), t->artist());
CPPUNIT_ASSERT_EQUAL(String(), t->album());