Use a standard type rather than TagLib::ulonglong.

TagLib::ulonglong is not used in the public headers, so the changes are trivial.
This commit is contained in:
Tsuda Kageyu 2015-12-02 09:13:10 +09:00
parent f38749aacf
commit 6966be4292
4 changed files with 18 additions and 18 deletions

View File

@ -159,8 +159,8 @@ void FLAC::Properties::read(const ByteVector &data, long streamLength)
// The last 4 bits are the most significant 4 bits for the 36 bit
// stream length in samples. (Audio files measured in days)
const ulonglong hi = flags & 0xf;
const ulonglong lo = data.toUInt(pos, true);
const unsigned long long hi = flags & 0xf;
const unsigned long long lo = data.toUInt(pos, true);
pos += 4;
d->sampleFrames = (hi << 32) | lo;

View File

@ -252,7 +252,7 @@ void RIFF::File::read()
break;
}
if(static_cast<ulonglong>(tell()) + chunkSize > static_cast<ulonglong>(length())) {
if(static_cast<long long>(tell()) + chunkSize > length()) {
debug("RIFF::File::read() -- Chunk '" + chunkName + "' has invalid size (larger than the file size)");
setValid(false);
break;
@ -278,8 +278,8 @@ void RIFF::File::read()
chunk.padding = 1;
}
}
d->chunks.push_back(chunk);
d->chunks.push_back(chunk);
}
}

View File

@ -277,15 +277,15 @@ long double toFloat80(const ByteVector &v, size_t offset)
const int exponent = ((bytes[0] & 0x7F) << 8) | bytes[1];
// 64-bit fraction. Leading 1 is explicit.
const ulonglong fraction
= (static_cast<ulonglong>(bytes[2]) << 56)
| (static_cast<ulonglong>(bytes[3]) << 48)
| (static_cast<ulonglong>(bytes[4]) << 40)
| (static_cast<ulonglong>(bytes[5]) << 32)
| (static_cast<ulonglong>(bytes[6]) << 24)
| (static_cast<ulonglong>(bytes[7]) << 16)
| (static_cast<ulonglong>(bytes[8]) << 8)
| (static_cast<ulonglong>(bytes[9]));
const unsigned long long fraction
= (static_cast<unsigned long long>(bytes[2]) << 56)
| (static_cast<unsigned long long>(bytes[3]) << 48)
| (static_cast<unsigned long long>(bytes[4]) << 40)
| (static_cast<unsigned long long>(bytes[5]) << 32)
| (static_cast<unsigned long long>(bytes[6]) << 24)
| (static_cast<unsigned long long>(bytes[7]) << 16)
| (static_cast<unsigned long long>(bytes[8]) << 8)
| (static_cast<unsigned long long>(bytes[9]));
long double val;
if(exponent == 0 && fraction == 0)
@ -384,12 +384,12 @@ ByteVector ByteVector::fromFloat32BE(float value)
ByteVector ByteVector::fromFloat64LE(double value)
{
return fromFloat<double, ulonglong, Utils::LittleEndian>(value);
return fromFloat<double, unsigned long long, Utils::LittleEndian>(value);
}
ByteVector ByteVector::fromFloat64BE(double value)
{
return fromFloat<double, ulonglong, Utils::BigEndian>(value);
return fromFloat<double, unsigned long long, Utils::BigEndian>(value);
}
////////////////////////////////////////////////////////////////////////////////
@ -756,12 +756,12 @@ float ByteVector::toFloat32BE(size_t offset) const
double ByteVector::toFloat64LE(size_t offset) const
{
return toFloat<double, ulonglong, Utils::LittleEndian>(*this, offset);
return toFloat<double, unsigned long long, Utils::LittleEndian>(*this, offset);
}
double ByteVector::toFloat64BE(size_t offset) const
{
return toFloat<double, ulonglong, Utils::BigEndian>(*this, offset);
return toFloat<double, unsigned long long, Utils::BigEndian>(*this, offset);
}
long double ByteVector::toFloat80LE(size_t offset) const

View File

@ -134,7 +134,7 @@ namespace TagLib
/*!
* Reverses the order of bytes in an 64-bit integer.
*/
inline ulonglong byteSwap(ulonglong x)
inline unsigned long long byteSwap(unsigned long long x)
{
#if defined(HAVE_BOOST_BYTESWAP)