mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 13:10:26 -04:00
clang-tidy: use auto
Found with modernize-use-auto Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
6d0f0ad170
commit
1635d4d563
@ -323,11 +323,11 @@ bool APE::Tag::setComplexProperties(const String &key, const List<VariantMap> &v
|
||||
|
||||
auto frontItems = List<Item>();
|
||||
auto backItems = List<Item>();
|
||||
for(auto property : value) {
|
||||
ByteVector data = property.value("description").value<String>().data(String::UTF8)
|
||||
for(const auto &property : value) {
|
||||
auto data = property.value("description").value<String>().data(String::UTF8)
|
||||
.append('\0')
|
||||
.append(property.value("data").value<ByteVector>());
|
||||
String pictureType = property.value("pictureType").value<String>();
|
||||
auto pictureType = property.value("pictureType").value<String>();
|
||||
Item item;
|
||||
item.setType(Item::Binary);
|
||||
item.setBinaryData(data);
|
||||
|
@ -432,7 +432,7 @@ bool ASF::Tag::setComplexProperties(const String &key, const List<VariantMap> &v
|
||||
if(uppercaseKey == "PICTURE") {
|
||||
removeItem("WM/Picture");
|
||||
|
||||
for(auto property : value) {
|
||||
for(const auto &property : value) {
|
||||
ASF::Picture picture;
|
||||
picture.setPicture(property.value("data").value<ByteVector>());
|
||||
picture.setMimeType(property.value("mimeType").value<String>());
|
||||
|
@ -200,8 +200,8 @@ bool FLAC::File::setComplexProperties(const String &key, const List<VariantMap>
|
||||
if(uppercaseKey == "PICTURE") {
|
||||
removePictures();
|
||||
|
||||
for(auto property : value) {
|
||||
FLAC::Picture *picture = new FLAC::Picture;
|
||||
for(const auto &property : value) {
|
||||
auto picture = new FLAC::Picture;
|
||||
picture->setData(property.value("data").value<ByteVector>());
|
||||
picture->setMimeType(property.value("mimeType").value<String>());
|
||||
picture->setDescription(property.value("description").value<String>());
|
||||
|
@ -558,8 +558,8 @@ bool MP4::Tag::setComplexProperties(const String &key, const List<VariantMap> &v
|
||||
const String uppercaseKey = key.upper();
|
||||
if(uppercaseKey == "PICTURE") {
|
||||
CoverArtList pictures;
|
||||
for(auto property : value) {
|
||||
String mimeType = property.value("mimeType").value<String>();
|
||||
for(const auto &property : value) {
|
||||
auto mimeType = property.value("mimeType").value<String>();
|
||||
CoverArt::Format format;
|
||||
if(mimeType == "image/bmp") {
|
||||
format = CoverArt::BMP;
|
||||
|
@ -501,7 +501,7 @@ bool ID3v2::Tag::setComplexProperties(const String &key, const List<VariantMap>
|
||||
if(uppercaseKey == "PICTURE") {
|
||||
removeFrames("APIC");
|
||||
|
||||
for(auto property : value) {
|
||||
for(const auto &property : value) {
|
||||
auto picture = new AttachedPictureFrame;
|
||||
picture->setPicture(property.value("data").value<ByteVector>());
|
||||
picture->setMimeType(property.value("mimeType").value<String>());
|
||||
@ -514,7 +514,7 @@ bool ID3v2::Tag::setComplexProperties(const String &key, const List<VariantMap>
|
||||
else if(uppercaseKey == "GENERALOBJECT") {
|
||||
removeFrames("GEOB");
|
||||
|
||||
for(auto property : value) {
|
||||
for(const auto &property : value) {
|
||||
auto geob = new GeneralEncapsulatedObjectFrame;
|
||||
geob->setObject(property.value("data").value<ByteVector>());
|
||||
geob->setMimeType(property.value("mimeType").value<String>());
|
||||
|
@ -272,8 +272,8 @@ bool Ogg::XiphComment::setComplexProperties(const String &key, const List<Varian
|
||||
if(uppercaseKey == "PICTURE") {
|
||||
removeAllPictures();
|
||||
|
||||
for(auto property : value) {
|
||||
FLAC::Picture *picture = new FLAC::Picture;
|
||||
for(const auto &property : value) {
|
||||
auto picture = new FLAC::Picture;
|
||||
picture->setData(property.value("data").value<ByteVector>());
|
||||
picture->setMimeType(property.value("mimeType").value<String>());
|
||||
picture->setDescription(property.value("description").value<String>());
|
||||
|
Loading…
Reference in New Issue
Block a user