mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-04 11:43:47 +01:00
Minor optimize methods std::string using param as char with simpler implementation
This commit is contained in:
1 parent
22fdf6624c
commit
c20cb3f4be
8 files changed
+13
-13
No files matched your search
@@ -686,7 +686,7 @@ bool CBreakPoints::EvaluateLogFormat(DebugInterface *cpu, const std::string &fmt
|
||||
|
||||
size_t pos = 0;
|
||||
while (pos < fmt.size()) {
|
||||
size_t next = fmt.find_first_of("{", pos);
|
||||
size_t next = fmt.find_first_of('{', pos);
|
||||
if (next == fmt.npos) {
|
||||
// End of the string.
|
||||
result += fmt.substr(pos);
|
||||
@@ -697,7 +697,7 @@ bool CBreakPoints::EvaluateLogFormat(DebugInterface *cpu, const std::string &fmt
|
||||
pos = next;
|
||||
}
|
||||
|
||||
size_t end = fmt.find_first_of("}", next + 1);
|
||||
size_t end = fmt.find_first_of('}', next + 1);
|
||||
if (end == fmt.npos) {
|
||||
// Invalid: every expression needs a { and a }.
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user