From 7528986e4449febead9b18b6118f0b096f7cf800 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Sat, 19 Aug 2017 14:25:35 +0200 Subject: Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282) * Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex --- src/quicktune_shortcutter.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/quicktune_shortcutter.h') diff --git a/src/quicktune_shortcutter.h b/src/quicktune_shortcutter.h index c8a449533..70a7b70b3 100644 --- a/src/quicktune_shortcutter.h +++ b/src/quicktune_shortcutter.h @@ -28,16 +28,16 @@ private: u32 m_selected_i; std::string m_message; public: - bool hasMessage() + bool hasMessage() const { - return m_message != ""; + return !m_message.empty(); } std::string getMessage() { std::string s = m_message; m_message = ""; - if(s != "") + if (!s.empty()) return std::string("[quicktune] ") + s; return ""; } -- cgit v1.2.3