diff options
author | Alexei Kotov <alexdobrohotov@yandex.ru> | 2024-02-28 01:06:42 +0300 |
---|---|---|
committer | Alexei Kotov <alexdobrohotov@yandex.ru> | 2024-02-28 01:06:42 +0300 |
commit | 27b1434f5b7e9fc40bc5cd8ebeac411994d4eaf5 (patch) | |
tree | 1a9cf9a21c58ba072c88e43919bb941a4be9357b | |
parent | 65aa222efa3d4a4cf49c8cdfb42e119d89b5220b (diff) |
Use string_view for full help text
-rw-r--r-- | apps/openmw/mwgui/tooltips.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index 938d4176f2..0e0c56c194 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -410,13 +410,13 @@ namespace MWGui const std::string& image = info.icon; int imageSize = (!image.empty()) ? info.imageSize : 0; std::string text = info.text; - std::string extra = info.extra; + std::string_view extra = info.extra; // remove the first newline (easier this way) if (!text.empty() && text[0] == '\n') text.erase(0, 1); if (!extra.empty() && extra[0] == '\n') - extra.erase(0, 1); + extra = extra.substr(1); const ESM::Enchantment* enchant = nullptr; const MWWorld::ESMStore& store = *MWBase::Environment::get().getESMStore(); |