aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-08-19 23:10:56 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-08-19 23:10:56 +0200
commitd376aa5fa9a2767c83ebfe2bdac50642cfbad96d (patch)
treee20f420e97ca71baef2c0d07f1791cd47f327e57
parentInitial commit of tag extractor and test main. (diff)
downloadmusic-file-organizer-d376aa5fa9a2767c83ebfe2bdac50642cfbad96d.tar.xz
music-file-organizer-d376aa5fa9a2767c83ebfe2bdac50642cfbad96d.zip
Add read tag program. Fix uninitialized error.
-rw-r--r--AudioFile.cpp2
-rw-r--r--Makefile10
-rw-r--r--readtags.cpp (renamed from test-main.cpp)0
3 files changed, 11 insertions, 1 deletions
diff --git a/AudioFile.cpp b/AudioFile.cpp
index 542d0c6..5157b11 100644
--- a/AudioFile.cpp
+++ b/AudioFile.cpp
@@ -19,7 +19,7 @@
template <typename T, typename M>
inline T extractTag(M &map, const char *key)
{
- T ret;
+ T ret = 0;
std::stringstream stream(extractTag<std::string>(map, key));
stream >> ret;
return ret;
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..dcf72b2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,10 @@
+LDFLAGS += $(shell pkg-config --libs taglib)
+CXXFLAGS ?= -O3 -pipe -fomit-frame-pointer -march=native
+CXXFLAGS += $(shell pkg-config --cflags taglib)
+
+
+all: readtags organizemusic
+
+readtags: AudioFile.cpp AudioFile.h readtags.cpp
+
+organizemusic: AudioFile.cpp AudioFile.h organizemusic.cpp
diff --git a/test-main.cpp b/readtags.cpp
index b5a3ef4..b5a3ef4 100644
--- a/test-main.cpp
+++ b/readtags.cpp