diff options
| author | Herman Semenov <GermanAizek@yandex.ru> | 2022-09-06 13:21:09 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-06 11:21:09 +0100 |
| commit | 038da00e799b4bf3af824075a260083c56392964 (patch) | |
| tree | 8c0e3218455073684c2521cec41b7df06fff8598 /src/util | |
| parent | ff6dcfea82974df6db5a557e31aaddb6bdb7a71f (diff) | |
| download | minetest-038da00e799b4bf3af824075a260083c56392964.tar.xz | |
Code optimizations / refactor (#12704)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/quicktune_shortcutter.h | 2 | ||||
| -rw-r--r-- | src/util/string.h | 2 |
2 files changed, 2 insertions, 2 deletions
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<std::basic_string<T> > split(const std::basic_string<T> &s, T delim) } else { if (si == delim) { tokens.push_back(current); - current = std::basic_string<T>(); + current.clear(); last_was_escape = false; } else if (si == '\\') { last_was_escape = true; |
