mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-29 08:45:36 +00:00
Use string_view for full help text
This commit is contained in:
parent
65aa222efa
commit
27b1434f5b
1 changed files with 2 additions and 2 deletions
|
@ -410,13 +410,13 @@ namespace MWGui
|
||||||
const std::string& image = info.icon;
|
const std::string& image = info.icon;
|
||||||
int imageSize = (!image.empty()) ? info.imageSize : 0;
|
int imageSize = (!image.empty()) ? info.imageSize : 0;
|
||||||
std::string text = info.text;
|
std::string text = info.text;
|
||||||
std::string extra = info.extra;
|
std::string_view extra = info.extra;
|
||||||
|
|
||||||
// remove the first newline (easier this way)
|
// remove the first newline (easier this way)
|
||||||
if (!text.empty() && text[0] == '\n')
|
if (!text.empty() && text[0] == '\n')
|
||||||
text.erase(0, 1);
|
text.erase(0, 1);
|
||||||
if (!extra.empty() && extra[0] == '\n')
|
if (!extra.empty() && extra[0] == '\n')
|
||||||
extra.erase(0, 1);
|
extra = extra.substr(1);
|
||||||
|
|
||||||
const ESM::Enchantment* enchant = nullptr;
|
const ESM::Enchantment* enchant = nullptr;
|
||||||
const MWWorld::ESMStore& store = *MWBase::Environment::get().getESMStore();
|
const MWWorld::ESMStore& store = *MWBase::Environment::get().getESMStore();
|
||||||
|
|
Loading…
Reference in a new issue