mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Merge pull request #418 from TsudaKageyu/debug-msg
Fixed some debug messages.
This commit is contained in:
commit
c23ee5331f
@ -177,7 +177,7 @@ FileName FileStream::name() const
|
||||
ByteVector FileStream::readBlock(ulong length)
|
||||
{
|
||||
if(!isOpen()) {
|
||||
debug("File::readBlock() -- invalid file.");
|
||||
debug("FileStream::readBlock() -- invalid file.");
|
||||
return ByteVector::null;
|
||||
}
|
||||
|
||||
@ -199,12 +199,12 @@ ByteVector FileStream::readBlock(ulong length)
|
||||
void FileStream::writeBlock(const ByteVector &data)
|
||||
{
|
||||
if(!isOpen()) {
|
||||
debug("File::writeBlock() -- invalid file.");
|
||||
debug("FileStream::writeBlock() -- invalid file.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(readOnly()) {
|
||||
debug("File::writeBlock() -- read only file.");
|
||||
debug("FileStream::writeBlock() -- read only file.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -214,12 +214,12 @@ void FileStream::writeBlock(const ByteVector &data)
|
||||
void FileStream::insert(const ByteVector &data, ulong start, ulong replace)
|
||||
{
|
||||
if(!isOpen()) {
|
||||
debug("File::insert() -- invalid file.");
|
||||
debug("FileStream::insert() -- invalid file.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(readOnly()) {
|
||||
debug("File::insert() -- read only file.");
|
||||
debug("FileStream::insert() -- read only file.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ void FileStream::insert(const ByteVector &data, ulong start, ulong replace)
|
||||
void FileStream::removeBlock(ulong start, ulong length)
|
||||
{
|
||||
if(!isOpen()) {
|
||||
debug("File::removeBlock() -- invalid file.");
|
||||
debug("FileStream::removeBlock() -- invalid file.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -343,7 +343,7 @@ bool FileStream::isOpen() const
|
||||
void FileStream::seek(long offset, Position p)
|
||||
{
|
||||
if(!isOpen()) {
|
||||
debug("File::seek() -- invalid file.");
|
||||
debug("FileStream::seek() -- invalid file.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -372,7 +372,7 @@ void FileStream::seek(long offset, Position p)
|
||||
SetFilePointer(d->file, 0, NULL, FILE_BEGIN);
|
||||
}
|
||||
if(GetLastError() != NO_ERROR) {
|
||||
debug("File::seek() -- Failed to set the file pointer.");
|
||||
debug("FileStream::seek() -- Failed to set the file pointer.");
|
||||
}
|
||||
|
||||
#else
|
||||
@ -421,7 +421,7 @@ long FileStream::tell() const
|
||||
return static_cast<long>(position);
|
||||
}
|
||||
else {
|
||||
debug("File::tell() -- Failed to get the file pointer.");
|
||||
debug("FileStream::tell() -- Failed to get the file pointer.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -435,7 +435,7 @@ long FileStream::tell() const
|
||||
long FileStream::length()
|
||||
{
|
||||
if(!isOpen()) {
|
||||
debug("File::length() -- invalid file.");
|
||||
debug("FileStream::length() -- invalid file.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -447,7 +447,7 @@ long FileStream::length()
|
||||
return static_cast<ulong>(fileSize);
|
||||
}
|
||||
else {
|
||||
debug("File::length() -- Failed to get the file size.");
|
||||
debug("FileStream::length() -- Failed to get the file size.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -480,7 +480,7 @@ void FileStream::truncate(long length)
|
||||
SetLastError(NO_ERROR);
|
||||
SetEndOfFile(d->file);
|
||||
if(GetLastError() != NO_ERROR) {
|
||||
debug("File::truncate() -- Failed to truncate the file.");
|
||||
debug("FileStream::truncate() -- Failed to truncate the file.");
|
||||
}
|
||||
|
||||
seek(currentPos);
|
||||
|
@ -70,7 +70,7 @@ namespace
|
||||
st, srcBegin, srcEnd, source, dstBegin, dstEnd, target);
|
||||
|
||||
if(result != utf8_utf16_t::ok) {
|
||||
debug("String::copyFromUTF8() - Unicode conversion error.");
|
||||
debug("String::UTF16toUTF8() - Unicode conversion error.");
|
||||
}
|
||||
|
||||
#else
|
||||
@ -88,7 +88,7 @@ namespace
|
||||
&srcBegin, srcEnd, &dstBegin, dstEnd, Unicode::lenientConversion);
|
||||
|
||||
if(result != Unicode::conversionOK) {
|
||||
debug("String::to8Bit() - Unicode conversion error.");
|
||||
debug("String::UTF16toUTF8() - Unicode conversion error.");
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -116,7 +116,7 @@ namespace
|
||||
st, srcBegin, srcEnd, source, dstBegin, dstEnd, target);
|
||||
|
||||
if(result != utf8_utf16_t::ok) {
|
||||
debug("String::copyFromUTF8() - Unicode conversion error.");
|
||||
debug("String::UTF8toUTF16() - Unicode conversion error.");
|
||||
}
|
||||
|
||||
#else
|
||||
@ -134,7 +134,7 @@ namespace
|
||||
&srcBegin, srcEnd, &dstBegin, dstEnd, Unicode::lenientConversion);
|
||||
|
||||
if(result != Unicode::conversionOK) {
|
||||
debug("String::copyFromUTF8() - Unicode conversion error.");
|
||||
debug("String::UTF8toUTF16() - Unicode conversion error.");
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -197,7 +197,7 @@ String::String(const std::string &s, Type t)
|
||||
else if(t == String::UTF8)
|
||||
copyFromUTF8(s.c_str(), s.length());
|
||||
else {
|
||||
debug("String::String() -- A std::string should not contain UTF16.");
|
||||
debug("String::String() -- std::string should not contain UTF16.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ String::String(const wstring &s, Type t)
|
||||
copyFromUTF16(s.c_str(), s.length(), t);
|
||||
}
|
||||
else {
|
||||
debug("String::String() -- A TagLib::wstring should not contain Latin1 or UTF-8.");
|
||||
debug("String::String() -- TagLib::wstring should not contain Latin1 or UTF-8.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ String::String(const wchar_t *s, Type t)
|
||||
copyFromUTF16(s, ::wcslen(s), t);
|
||||
}
|
||||
else {
|
||||
debug("String::String() -- A const wchar_t * should not contain Latin1 or UTF-8.");
|
||||
debug("String::String() -- const wchar_t * should not contain Latin1 or UTF-8.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ String::String(const char *s, Type t)
|
||||
else if(t == String::UTF8)
|
||||
copyFromUTF8(s, ::strlen(s));
|
||||
else {
|
||||
debug("String::String() -- A const char * should not contain UTF16.");
|
||||
debug("String::String() -- const char * should not contain UTF16.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ String::String(wchar_t c, Type t)
|
||||
if(t == UTF16 || t == UTF16BE || t == UTF16LE)
|
||||
copyFromUTF16(&c, 1, t);
|
||||
else {
|
||||
debug("String::String() -- A const wchar_t should not contain Latin1 or UTF-8.");
|
||||
debug("String::String() -- wchar_t should not contain Latin1 or UTF-8.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ String::String(char c, Type t)
|
||||
: d(new StringPrivate(1, static_cast<uchar>(c)))
|
||||
{
|
||||
if(t != Latin1 && t != UTF8) {
|
||||
debug("String::String() -- A char should not contain UTF16.");
|
||||
debug("String::String() -- char should not contain UTF16.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user