A few more nitpicks.

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@331315 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Scott Wheeler
2004-07-20 22:40:57 +00:00
parent 382f8194c1
commit 28738debc1
4 changed files with 11 additions and 12 deletions

View File

@ -247,7 +247,7 @@ void APE::Tag::setYear(uint i)
void APE::Tag::setTrack(uint i)
{
if(i <=0 )
if(i <= 0)
removeComment("Track");
else
d->items["Track"] = String::number(i);
@ -255,7 +255,7 @@ void APE::Tag::setTrack(uint i)
void APE::Tag::removeComment(const String &key) {
Map<String,String>::Iterator it = d->items.find(key);
if (it != d->items.end())
if(it != d->items.end())
d->items.erase(it);
}
@ -267,7 +267,7 @@ void APE::Tag::addComment(const String &key, const String &value)
d->items[key] = value;
}
TagLib::uint APE::Tag::tagSize(ByteVector footer)
TagLib::uint APE::Tag::tagSize(const ByteVector &footer)
{
// The reported length (excl. header)
@ -293,11 +293,11 @@ void APE::Tag::read()
// parse footer and some initial sanity checking
if(footer.size() == 32 && footer.mid(0, 8) == "APETAGEX") {
uint length = footer.mid(12,4).toUInt(false);
uint count = footer.mid(16,4).toUInt(false);
uint length = footer.mid(12, 4).toUInt(false);
uint count = footer.mid(16, 4).toUInt(false);
d->tagLength = length;
d->file->seek(d->tagOffset + 32 -length);
ByteVector data = d->file->readBlock(length-32);
d->file->seek(d->tagOffset + 32 - length);
ByteVector data = d->file->readBlock(length - 32);
parse(data, count);
}
else

View File

@ -67,7 +67,7 @@ namespace TagLib {
/*!
* Returns the size of the tag calculated based on the footer.
*/
static uint tagSize(ByteVector footer);
static uint tagSize(const ByteVector &footer);
// Reimplementations.

View File

@ -133,7 +133,7 @@ bool MPC::File::save()
// private members
////////////////////////////////////////////////////////////////////////////////
void MPC::File::read(bool readProperties, Properties::ReadStyle propertiesStyle)
void MPC::File::read(bool readProperties, Properties::ReadStyle /* propertiesStyle */)
{
// Look for an APE tag

View File

@ -31,7 +31,7 @@ using namespace TagLib;
class MPC::Properties::PropertiesPrivate
{
public:
PropertiesPrivate(ByteVector d, long st, ReadStyle s) :
PropertiesPrivate(const ByteVector &d, long st, ReadStyle s) :
data(d),
streamLength(st),
style(s),
@ -106,7 +106,7 @@ static const unsigned short sftable [4] = { 44100, 48000, 37800, 32000 };
void MPC::Properties::read()
{
if(d->data.mid(0,3) != "MP+")
if(d->data.mid(0, 3) != "MP+")
return;
d->version = d->data[3] & 15;
@ -137,5 +137,4 @@ void MPC::Properties::read()
if(!d->bitrate)
d->bitrate = ((d->streamLength * 8L) / d->length) / 1000;
}