From 038da00e799b4bf3af824075a260083c56392964 Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Tue, 6 Sep 2022 13:21:09 +0300 Subject: Code optimizations / refactor (#12704) Co-authored-by: SmallJoker Co-authored-by: sfan5 --- src/util/quicktune_shortcutter.h | 2 +- src/util/string.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/util') diff --git a/src/util/quicktune_shortcutter.h b/src/util/quicktune_shortcutter.h index 70a7b70b3..4cab05ff6 100644 --- a/src/util/quicktune_shortcutter.h +++ b/src/util/quicktune_shortcutter.h @@ -36,7 +36,7 @@ public: std::string getMessage() { std::string s = m_message; - m_message = ""; + m_message.clear(); if (!s.empty()) return std::string("[quicktune] ") + s; return ""; diff --git a/src/util/string.h b/src/util/string.h index aa4329f2f..83cce3765 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -610,7 +610,7 @@ std::vector > split(const std::basic_string &s, T delim) } else { if (si == delim) { tokens.push_back(current); - current = std::basic_string(); + current.clear(); last_was_escape = false; } else if (si == '\\') { last_was_escape = true; -- cgit v1.2.3