From 8a6d120ab5cb47b4afdd0c29a9e0db51a47ff3f0 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 30 Jul 2020 12:22:02 +0200 Subject: Use itemMap() instead of deprecated itemListMap() --- AudioFile.cpp | 10 +++++----- Makefile | 2 +- 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(const TagLib::Ogg::Field } /* Extract an integer pair out of an MP4 map. */ template -inline std::pair extractTag(const TagLib::MP4::ItemListMap &map, const char *key) +inline std::pair extractTag(const TagLib::MP4::ItemMap &map, const char *key) { if (!map[key].isValid()) return std::pair(0, 0); @@ -83,7 +83,7 @@ inline std::pair extractTag(const TagLib::MP4::ItemListMap &map, const c } /* Extract an integer out of an MP4 map. */ template <> -inline unsigned int extractTag(const TagLib::MP4::ItemListMap &map, const char *key) +inline unsigned int extractTag(const TagLib::MP4::ItemMap &map, const char *key) { if (!map[key].isValid()) return 0; @@ -91,7 +91,7 @@ inline unsigned int extractTag(const Tag } /* Extract a string out of an MP4 map. */ template <> -inline std::string extractTag(const TagLib::MP4::ItemListMap &map, const char *key) +inline std::string extractTag(const TagLib::MP4::ItemMap &map, const char *key) { if (!map[key].isValid()) return std::string(); @@ -99,7 +99,7 @@ inline std::string extractTag(const TagLi } /* Extract a bool out of an MP4 map. */ template <> -inline bool extractTag(const TagLib::MP4::ItemListMap &map, const char *key) +inline bool extractTag(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(fileRef.file())) { if (file->tag()) { - const TagLib::MP4::ItemListMap &map = file->tag()->itemListMap(); + const TagLib::MP4::ItemMap &map = file->tag()->itemMap(); std::pair discPair = extractTag(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 -- cgit v1.2.3-59-g8ed1b