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

@ -55,7 +55,7 @@ bool Mod::FileBase::readString(String &s, ulong size)
return true;
}
void Mod::FileBase::writeByte(uchar byte)
void Mod::FileBase::writeByte(unsigned char byte)
{
ByteVector data(1, byte);
writeBlock(data);
@ -81,7 +81,7 @@ void Mod::FileBase::writeU32B(ulong number)
writeBlock(ByteVector::fromUInt(number, true));
}
bool Mod::FileBase::readByte(uchar &byte)
bool Mod::FileBase::readByte(unsigned char &byte)
{
ByteVector data(readBlock(1));
if(data.size() < 1) return false;

View File

@ -41,14 +41,14 @@ namespace TagLib {
FileBase(IOStream *stream);
void writeString(const String &s, ulong size, char padding = 0);
void writeByte(uchar byte);
void writeByte(unsigned char byte);
void writeU16L(ushort number);
void writeU32L(ulong number);
void writeU16B(ushort number);
void writeU32B(ulong number);
bool readString(String &s, ulong size);
bool readByte(uchar &byte);
bool readByte(unsigned char &byte);
bool readU16L(ushort &number);
bool readU32L(ulong &number);
bool readU16B(ushort &number);

View File

@ -37,7 +37,7 @@
setter(number); \
}
#define READ_BYTE(setter) READ(setter,uchar,readByte)
#define READ_BYTE(setter) READ(setter,unsigned char,readByte)
#define READ_U16L(setter) READ(setter,ushort,readU16L)
#define READ_U32L(setter) READ(setter,ulong,readU32L)
#define READ_U16B(setter) READ(setter,ushort,readU16B)
@ -54,7 +54,7 @@
type name = 0; \
READ_ASSERT(read(name));
#define READ_BYTE_AS(name) READ_AS(uchar,name,readByte)
#define READ_BYTE_AS(name) READ_AS(unsigned char,name,readByte)
#define READ_U16L_AS(name) READ_AS(ushort,name,readU16L)
#define READ_U32L_AS(name) READ_AS(ulong,name,readU32L)
#define READ_U16B_AS(name) READ_AS(ushort,name,readU16B)

View File

@ -36,7 +36,7 @@ public:
int channels;
uint instrumentCount;
uchar lengthInPatterns;
unsigned char lengthInPatterns;
};
Mod::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) :
@ -85,7 +85,7 @@ TagLib::uint Mod::Properties::instrumentCount() const
return d->instrumentCount;
}
uchar Mod::Properties::lengthInPatterns() const
unsigned char Mod::Properties::lengthInPatterns() const
{
return d->lengthInPatterns;
}
@ -100,7 +100,7 @@ void Mod::Properties::setInstrumentCount(uint instrumentCount)
d->instrumentCount = instrumentCount;
}
void Mod::Properties::setLengthInPatterns(uchar lengthInPatterns)
void Mod::Properties::setLengthInPatterns(unsigned char lengthInPatterns)
{
d->lengthInPatterns = lengthInPatterns;
}

View File

@ -43,12 +43,12 @@ namespace TagLib {
int channels() const;
uint instrumentCount() const;
uchar lengthInPatterns() const;
unsigned char lengthInPatterns() const;
void setChannels(int channels);
void setInstrumentCount(uint sampleCount);
void setLengthInPatterns(uchar lengthInPatterns);
void setLengthInPatterns(unsigned char lengthInPatterns);
private:
friend class File;