Avoid Coverity should move warnings.

This commit is contained in:
Neil Hodgson 2025-04-07 17:00:24 +10:00
parent e69590bfba
commit 6d51ba20fe
3 changed files with 3 additions and 7 deletions

View File

@ -1820,7 +1820,7 @@ Tokens LexerCPP::Tokenize(const std::string &expr) const {
word += *cp;
cp++;
}
tokens.push_back(word);
tokens.push_back(std::move(word));
}
return tokens;
}

View File

@ -533,11 +533,7 @@ void LexerPython::ProcessLineEnd(StyleContext &sc, std::vector<SingleFStringExpS
}
if (!fstringStateStack.empty()) {
std::pair<Sci_Position, std::vector<SingleFStringExpState> > val;
val.first = sc.currentLine;
val.second = fstringStateStack;
ftripleStateAtEol.insert(val);
ftripleStateAtEol.insert({sc.currentLine, fstringStateStack});
}
if ((sc.state == SCE_P_DEFAULT)

View File

@ -43,7 +43,7 @@ public:
void Set(Sci_Position position, T value) {
Delete(position);
if (states.empty() || (value != states[states.size()-1].value)) {
states.push_back(State(position, value));
states.emplace_back(position, value);
}
}
T ValueAt(Sci_Position position) {