sys: Make sure constexpr variables don't get copied onto the stack

This commit is contained in:
WerWolv
2022-09-12 21:28:02 +02:00
parent 7e3601989a
commit aa658b7dbc
14 changed files with 29 additions and 29 deletions

View File

@@ -75,7 +75,7 @@ namespace hex::plugin::builtin {
}
std::vector<ViewCommandPalette::CommandResult> ViewCommandPalette::getCommandResults(const std::string &input) {
constexpr auto MatchCommand = [](const std::string &currCommand, const std::string &commandToMatch) -> std::pair<MatchType, std::string_view> {
constexpr static auto MatchCommand = [](const std::string &currCommand, const std::string &commandToMatch) -> std::pair<MatchType, std::string_view> {
if (currCommand.empty()) {
return { MatchType::InfoMatch, "" };
} else if (currCommand.size() <= commandToMatch.size()) {