aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-07-30 12:22:02 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-07-30 12:22:02 +0200
commit8a6d120ab5cb47b4afdd0c29a9e0db51a47ff3f0 (patch)
tree98822f768ad0a680ea04bed9ae4aa604b3bbe4b8
parentICU is namespaced now (diff)
downloadmusic-file-organizer-8a6d120ab5cb47b4afdd0c29a9e0db51a47ff3f0.tar.xz
music-file-organizer-8a6d120ab5cb47b4afdd0c29a9e0db51a47ff3f0.zip
Use itemMap() instead of deprecated itemListMap()
-rw-r--r--AudioFile.cpp10
-rw-r--r--Makefile2
2 files changed, 6 insertions, 6 deletions
diff --git a/AudioFile.cpp b/AudioFile.cpp
index dce8291..661d662 100644
--- a/AudioFile.cpp
+++ b/AudioFile.cpp
@@ -74,7 +74,7 @@ inline bool extractTag<bool, TagLib::Ogg::FieldListMap>(const TagLib::Ogg::Field
}
/* Extract an integer pair out of an MP4 map. */
template <typename T1, typename T2>
-inline std::pair<T1, T2> extractTag(const TagLib::MP4::ItemListMap &map, const char *key)
+inline std::pair<T1, T2> extractTag(const TagLib::MP4::ItemMap &map, const char *key)
{
if (!map[key].isValid())
return std::pair<T1, T2>(0, 0);
@@ -83,7 +83,7 @@ inline std::pair<T1, T2> extractTag(const TagLib::MP4::ItemListMap &map, const c
}
/* Extract an integer out of an MP4 map. */
template <>
-inline unsigned int extractTag<unsigned int, TagLib::MP4::ItemListMap>(const TagLib::MP4::ItemListMap &map, const char *key)
+inline unsigned int extractTag<unsigned int, TagLib::MP4::ItemMap>(const TagLib::MP4::ItemMap &map, const char *key)
{
if (!map[key].isValid())
return 0;
@@ -91,7 +91,7 @@ inline unsigned int extractTag<unsigned int, TagLib::MP4::ItemListMap>(const Tag
}
/* Extract a string out of an MP4 map. */
template <>
-inline std::string extractTag<std::string, TagLib::MP4::ItemListMap>(const TagLib::MP4::ItemListMap &map, const char *key)
+inline std::string extractTag<std::string, TagLib::MP4::ItemMap>(const TagLib::MP4::ItemMap &map, const char *key)
{
if (!map[key].isValid())
return std::string();
@@ -99,7 +99,7 @@ inline std::string extractTag<std::string, TagLib::MP4::ItemListMap>(const TagLi
}
/* Extract a bool out of an MP4 map. */
template <>
-inline bool extractTag<bool, TagLib::MP4::ItemListMap>(const TagLib::MP4::ItemListMap &map, const char *key)
+inline bool extractTag<bool, TagLib::MP4::ItemMap>(const TagLib::MP4::ItemMap &map, const char *key)
{
if (!map[key].isValid())
return false;
@@ -193,7 +193,7 @@ AudioFile::AudioFile(const std::string &filename) :
}
} else if (TagLib::MP4::File *file = dynamic_cast<TagLib::MP4::File*>(fileRef.file())) {
if (file->tag()) {
- const TagLib::MP4::ItemListMap &map = file->tag()->itemListMap();
+ const TagLib::MP4::ItemMap &map = file->tag()->itemMap();
std::pair<unsigned int, unsigned int> discPair = extractTag<unsigned int, unsigned int>(map, "disk");
m_disc = discPair.first;
m_discTotal = discPair.second;
diff --git a/Makefile b/Makefile
index 1664b58..8c28a04 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ DESTDIR ?=
BINDIR ?= $(PREFIX)/bin
LDLIBS += $(shell pkg-config --libs taglib icu-i18n)
-CXXFLAGS ?= -O3 -pipe -fomit-frame-pointer -march=native
+CXXFLAGS ?= -O3 -pipe -march=native
CXXFLAGS += $(shell pkg-config --cflags taglib icu-i18n)
.PHONY: clean install