From 27b1434f5b7e9fc40bc5cd8ebeac411994d4eaf5 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Wed, 28 Feb 2024 01:06:42 +0300 Subject: [PATCH] Use string_view for full help text --- apps/openmw/mwgui/tooltips.cpp | 4 ++-- 1 file 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();