Use string_view in more places and reduce the number of empty string literals

This commit is contained in:
Evil Eye 2023-05-21 16:39:32 +02:00
parent 5b36ea0179
commit 5491512905
45 changed files with 224 additions and 221 deletions

View file

@ -171,17 +171,17 @@ namespace
namespace Interpreter
{
std::string fixDefinesDialog(const std::string& text, Context& context)
std::string fixDefinesDialog(std::string_view text, Context& context)
{
return fixDefinesReal(text, true, context);
}
std::string fixDefinesMsgBox(const std::string& text, Context& context)
std::string fixDefinesMsgBox(std::string_view text, Context& context)
{
return fixDefinesReal(text, false, context);
}
std::string fixDefinesBook(const std::string& text, Context& context)
std::string fixDefinesBook(std::string_view text, Context& context)
{
return fixDefinesReal(text, false, context);
}

View file

@ -6,9 +6,9 @@
namespace Interpreter
{
std::string fixDefinesDialog(const std::string& text, Context& context);
std::string fixDefinesMsgBox(const std::string& text, Context& context);
std::string fixDefinesBook(const std::string& text, Context& context);
std::string fixDefinesDialog(std::string_view text, Context& context);
std::string fixDefinesMsgBox(std::string_view text, Context& context);
std::string fixDefinesBook(std::string_view text, Context& context);
}
#endif