cppcheck: match function argument names

Found with funcArgNamesDifferent

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-01-18 12:41:50 -08:00 committed by Urs Fleisch
parent 769feafbe0
commit 208fc93aaa
9 changed files with 46 additions and 46 deletions

View File

@ -141,10 +141,10 @@ void APE::Item::setValue(const String &value)
d->value.clear();
}
void APE::Item::setValues(const StringList &value)
void APE::Item::setValues(const StringList &values)
{
d->type = Text;
d->text = value;
d->text = values;
d->value.clear();
}

View File

@ -162,30 +162,30 @@ ASF::Picture ASF::Attribute::toPicture() const
return d->pictureValue;
}
String ASF::Attribute::parse(ASF::File &f, int kind)
String ASF::Attribute::parse(ASF::File &file, int kind)
{
unsigned int size, nameLength;
String name;
d->pictureValue = Picture::fromInvalid();
// extended content descriptor
if(kind == 0) {
nameLength = readWORD(&f);
name = readString(&f, nameLength);
d->type = static_cast<ASF::Attribute::AttributeTypes>(readWORD(&f));
size = readWORD(&f);
nameLength = readWORD(&file);
name = readString(&file, nameLength);
d->type = static_cast<ASF::Attribute::AttributeTypes>(readWORD(&file));
size = readWORD(&file);
}
// metadata & metadata library
else {
int temp = readWORD(&f);
int temp = readWORD(&file);
// metadata library
if(kind == 2) {
d->language = temp;
}
d->stream = readWORD(&f);
nameLength = readWORD(&f);
d->type = static_cast<ASF::Attribute::AttributeTypes>(readWORD(&f));
size = readDWORD(&f);
name = readString(&f, nameLength);
d->stream = readWORD(&file);
nameLength = readWORD(&file);
d->type = static_cast<ASF::Attribute::AttributeTypes>(readWORD(&file));
size = readDWORD(&file);
name = readString(&file, nameLength);
}
if(kind != 2 && size > 65535) {
@ -194,33 +194,33 @@ String ASF::Attribute::parse(ASF::File &f, int kind)
switch(d->type) {
case WordType:
d->numericValue = readWORD(&f);
d->numericValue = readWORD(&file);
break;
case BoolType:
if(kind == 0) {
d->numericValue = (readDWORD(&f) != 0);
d->numericValue = (readDWORD(&file) != 0);
}
else {
d->numericValue = (readWORD(&f) != 0);
d->numericValue = (readWORD(&file) != 0);
}
break;
case DWordType:
d->numericValue = readDWORD(&f);
d->numericValue = readDWORD(&file);
break;
case QWordType:
d->numericValue = readQWORD(&f);
d->numericValue = readQWORD(&file);
break;
case UnicodeType:
d->stringValue = readString(&f, size);
d->stringValue = readString(&file, size);
break;
case BytesType:
case GuidType:
d->byteVectorValue = f.readBlock(size);
d->byteVectorValue = file.readBlock(size);
break;
}

View File

@ -189,9 +189,9 @@ PropertyMap DSDIFF::File::properties() const
return d->tag.properties();
}
void DSDIFF::File::removeUnsupportedProperties(const StringList &unsupported)
void DSDIFF::File::removeUnsupportedProperties(const StringList &properties)
{
d->tag.removeUnsupportedProperties(unsupported);
d->tag.removeUnsupportedProperties(properties);
}
PropertyMap DSDIFF::File::setProperties(const PropertyMap &properties)

View File

@ -72,7 +72,7 @@ namespace TagLib {
* Sets the mime type of the image. This should in most cases be
* "image/png" or "image/jpeg".
*/
void setMimeType(const String &m);
void setMimeType(const String &mimeType);
/*!
* Returns a text description of the image.
@ -81,10 +81,10 @@ namespace TagLib {
String description() const;
/*!
* Sets a textual description of the image to \a desc.
* Sets a textual description of the image to \a description.
*/
void setDescription(const String &desc);
void setDescription(const String &description);
/*!
* Returns the width of the image.
@ -94,7 +94,7 @@ namespace TagLib {
/*!
* Sets the width of the image.
*/
void setWidth(int w);
void setWidth(int width);
/*!
* Returns the height of the image.
@ -104,7 +104,7 @@ namespace TagLib {
/*!
* Sets the height of the image.
*/
void setHeight(int h);
void setHeight(int height);
/*!
* Returns the color depth (in bits-per-pixel) of the image.
@ -114,7 +114,7 @@ namespace TagLib {
/*!
* Sets the color depth (in bits-per-pixel) of the image.
*/
void setColorDepth(int depth);
void setColorDepth(int colorDepth);
/*!
* Returns the number of colors used on the image..
@ -149,7 +149,7 @@ namespace TagLib {
/*!
* Parse the picture data in the FLAC picture block format.
*/
bool parse(const ByteVector &rawData);
bool parse(const ByteVector &data);
private:
class PicturePrivate;

View File

@ -247,10 +247,10 @@ ID3v1::GenreMap ID3v1::genreMap()
return m;
}
String ID3v1::genre(int i)
String ID3v1::genre(int index)
{
if(i >= 0 && static_cast<size_t>(i) < genres.size())
return String(genres[i]); // always make a copy
if(index >= 0 && static_cast<size_t>(index) < genres.size())
return String(genres[index]); // always make a copy
return String();
}

View File

@ -74,14 +74,14 @@ namespace TagLib {
* Constructs an MPEG file from \a file. If \a readProperties is \c true the
* file's audio properties will also be read.
*
* If \a propertiesStyle is not Fast, the file will be scanned
* If \a readStyle is not Fast, the file will be scanned
* completely if no ID3v2 tag or MPEG sync code is found at the start.
*
* If this file contains an ID3v2 tag, the frames will be created using
* \a frameFactory (default if null).
*/
File(FileName file, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average,
Properties::ReadStyle readStyle = Properties::Average,
ID3v2::FrameFactory *frameFactory = nullptr);
/*!
@ -91,7 +91,7 @@ namespace TagLib {
* If this file contains an ID3v2 tag, the frames will be created using
* \a frameFactory.
*
* If \a propertiesStyle is not Fast, the file will be scanned
* If \a readStyle is not Fast, the file will be scanned
* completely if no ID3v2 tag or MPEG sync code is found at the start.
*
* \deprecated Use the constructor above.
@ -99,7 +99,7 @@ namespace TagLib {
TAGLIB_DEPRECATED
File(FileName file, ID3v2::FrameFactory *frameFactory,
bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
Properties::ReadStyle readStyle = Properties::Average);
/*!
* Constructs an MPEG file from \a stream. If \a readProperties is \c true the
@ -111,14 +111,14 @@ namespace TagLib {
* If this file contains an ID3v2 tag, the frames will be created using
* \a frameFactory.
*
* If \a propertiesStyle is not Fast, the file will be scanned
* If \a readStyle is not Fast, the file will be scanned
* completely if no ID3v2 tag or MPEG sync code is found at the start.
*
* If this file contains an ID3v2 tag, the frames will be created using
* \a frameFactory (default if null).
*/
File(IOStream *stream, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average,
Properties::ReadStyle readStyle = Properties::Average,
ID3v2::FrameFactory *frameFactory = nullptr);
/*!
@ -131,7 +131,7 @@ namespace TagLib {
* If this file contains an ID3v2 tag, the frames will be created using
* \a frameFactory.
*
* If \a propertiesStyle is not Fast, the file will be scanned
* If \a readStyle is not Fast, the file will be scanned
* completely if no ID3v2 tag or MPEG sync code is found at the start.
*
* \deprecated Use the constructor above.
@ -139,7 +139,7 @@ namespace TagLib {
TAGLIB_DEPRECATED
File(IOStream *stream, ID3v2::FrameFactory *frameFactory,
bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
Properties::ReadStyle readStyle = Properties::Average);
/*!
* Destroys this instance of the File.

View File

@ -190,7 +190,7 @@ void Tag::duplicate(const Tag *source, Tag *target, bool overwrite) // static
}
}
String Tag::joinTagValues(const StringList &l)
String Tag::joinTagValues(const StringList &values)
{
return l.toString(" / ");
return values.toString(" / ");
}

View File

@ -281,13 +281,13 @@ namespace TagLib {
protected:
/*!
* Construct a File object and open the \a file. \a file should be a
* Construct a File object and open the \a fileName. \a fileName should be a
* C-string in the local file system encoding.
*
* \note Constructor is protected since this class should only be
* instantiated through subclasses.
*/
File(FileName file);
File(FileName fileName);
/*!
* Construct a File object and use the \a stream instance.

View File

@ -43,10 +43,10 @@ namespace TagLib {
{
public:
/*!
* Construct a FileStream object and open the \a file. \a file should be a
* Construct a FileStream object and open the \a fileName. \a fileName should be a
* C-string in the local file system encoding.
*/
FileStream(FileName file, bool openReadOnly = false);
FileStream(FileName fileName, bool openReadOnly = false);
/*!
* Construct a FileStream object using an existing \a fileDescriptor.