mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
clang-tidy: use const references
Found with performance-unnecessary-value-param Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
1635d4d563
commit
b07db7510f
@ -65,7 +65,7 @@ String Utils::pictureTypeToString(int type)
|
||||
return "";
|
||||
}
|
||||
|
||||
int Utils::pictureTypeFromString(String str)
|
||||
int Utils::pictureTypeFromString(const String& str)
|
||||
{
|
||||
for(int i = 0; i < static_cast<int>(std::size(typeStrs)); ++i) {
|
||||
if(str == typeStrs[i]) {
|
||||
|
@ -93,7 +93,7 @@ enum name { \
|
||||
static TagLib::String typeToString(name type) { \
|
||||
return TagLib::Utils::pictureTypeToString(type); \
|
||||
} \
|
||||
static name typeFromString(TagLib::String str) { \
|
||||
static name typeFromString(const TagLib::String &str) { \
|
||||
return static_cast<name>( \
|
||||
TagLib::Utils::pictureTypeFromString(str)); \
|
||||
}
|
||||
@ -112,7 +112,7 @@ namespace TagLib {
|
||||
/*!
|
||||
* Get picture type from string representation.
|
||||
*/
|
||||
int TAGLIB_EXPORT pictureTypeFromString(String str);
|
||||
int TAGLIB_EXPORT pictureTypeFromString(const String& str);
|
||||
|
||||
} // namespace Utils
|
||||
} // namespace TagLib
|
||||
|
Loading…
Reference in New Issue
Block a user