From 54fd2d65c6b6d32891cb6f483a8963f476f3d685 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Thu, 22 Dec 2016 10:35:15 +0100 Subject: [PATCH] Compile cleanly with GCC 4.9.4 --- src/lyrics.cpp | 1 - src/lyrics.h | 1 + src/regex_filter.h | 12 ++++++------ src/visualizer.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lyrics.cpp b/src/lyrics.cpp index 248d4f4..8a78de5 100644 --- a/src/lyrics.cpp +++ b/src/lyrics.cpp @@ -18,7 +18,6 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include #include #include #include diff --git a/src/lyrics.h b/src/lyrics.h index b007acf..d91fd46 100644 --- a/src/lyrics.h +++ b/src/lyrics.h @@ -21,6 +21,7 @@ #ifndef NCMPCPP_LYRICS_H #define NCMPCPP_LYRICS_H +#include #include #include #include diff --git a/src/regex_filter.h b/src/regex_filter.h index c0b49a4..398b0e0 100644 --- a/src/regex_filter.h +++ b/src/regex_filter.h @@ -82,11 +82,11 @@ struct Filter Filter() { } template - Filter(const std::string &constraint, + Filter(const std::string &constraint_, boost::regex_constants::syntax_option_type flags, FilterT &&filter) - : m_rx(make(constraint, flags)) - , m_constraint(constraint) + : m_rx(make(constraint_, flags)) + , m_constraint(constraint_) , m_filter(std::forward(filter)) { } @@ -124,11 +124,11 @@ template struct ItemFilter ItemFilter() { } template - ItemFilter(const std::string &constraint, + ItemFilter(const std::string &constraint_, boost::regex_constants::syntax_option_type flags, FilterT &&filter) - : m_rx(make(constraint, flags)) - , m_constraint(constraint) + : m_rx(make(constraint_, flags)) + , m_constraint(constraint_) , m_filter(std::forward(filter)) { } diff --git a/src/visualizer.cpp b/src/visualizer.cpp index 093faee..4871d47 100644 --- a/src/visualizer.cpp +++ b/src/visualizer.cpp @@ -109,7 +109,7 @@ void Visualizer::update() // PCM in format 44100:16:1 (for mono visualization) and // 44100:16:2 (for stereo visualization) is supported. int16_t buf[m_samples]; - ssize_t data = read(m_fifo, buf, sizeof(buf)); + ssize_t data = read(m_fifo, buf, sizeof(int16_t) * m_samples); if (data < 0) // no data available in fifo return; -- 2.11.4.GIT