mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Fix issues reported by CppCheck
Many shadowFunction, some useStlAlgorithm, and others. cppcheck --enable=all --inline-suppr \ --suppress=noExplicitConstructor --suppress=unusedFunction \ --suppress=missingIncludeSystem --project=compile_commands.json
This commit is contained in:
@ -74,9 +74,8 @@ namespace
|
||||
}
|
||||
|
||||
private:
|
||||
CustomFrame(const ByteVector &data, Header *h) : Frame(h) {
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
CustomFrame(const ByteVector &data, Header *h)
|
||||
: Frame(h), m_value(fieldData(data).toUInt()) {}
|
||||
unsigned int m_value;
|
||||
};
|
||||
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
testRead(copy.fileName().c_str(), titleAfter, commentAfter);
|
||||
CPPUNIT_ASSERT(fileEqual(
|
||||
copy.fileName(),
|
||||
TEST_FILE_PATH_C("changed.mod")));
|
||||
testFilePath("changed.mod")));
|
||||
}
|
||||
|
||||
void testPropertyInterface()
|
||||
|
@ -714,7 +714,7 @@ public:
|
||||
CPPUNIT_ASSERT(f.tag()->isEmpty());
|
||||
CPPUNIT_ASSERT(fileEqual(
|
||||
copy.fileName(),
|
||||
TEST_FILE_PATH_C("no-tags.m4a")));
|
||||
testFilePath("no-tags.m4a")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
testRead(copy.fileName().c_str(), titleAfter, commentAfter);
|
||||
CPPUNIT_ASSERT(fileEqual(
|
||||
copy.fileName(),
|
||||
TEST_FILE_PATH_C("changed.s3m")));
|
||||
testFilePath("changed.s3m")));
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -108,6 +108,7 @@ public:
|
||||
taglib_property_set_append(file, "COMPOSER", "Composer 2");
|
||||
taglib_property_set(file, "ALBUMARTIST", "Album Artist");
|
||||
|
||||
// cppcheck-suppress cstyleCast
|
||||
TAGLIB_COMPLEX_PROPERTY_PICTURE(props, "JPEG Data", 9, "Written by TagLib",
|
||||
"image/jpeg", "Front Cover");
|
||||
taglib_complex_property_set(file, "PICTURE", props);
|
||||
|
@ -216,7 +216,7 @@ private:
|
||||
commentAfter, trackerNameAfter);
|
||||
CPPUNIT_ASSERT(fileEqual(
|
||||
copy.fileName(),
|
||||
TEST_FILE_PATH_C("changed.xm")));
|
||||
testFilePath("changed.xm")));
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user