mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 00:11:00 +00:00
Avoid creating and destroying a std::string on every iteration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238343 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
61aecc8c23
commit
fb421f446e
@ -49,9 +49,9 @@ static ManagedStatic<std::vector<std::string>> CurrentDebugType;
|
||||
bool isCurrentDebugType(const char *DebugType) {
|
||||
if (CurrentDebugType->empty())
|
||||
return true;
|
||||
// see if DebugType is in list. Note: do not use find() as that forces us to
|
||||
// See if DebugType is in list. Note: do not use find() as that forces us to
|
||||
// unnecessarily create an std::string instance.
|
||||
for (auto d : *CurrentDebugType) {
|
||||
for (auto &d : *CurrentDebugType) {
|
||||
if (d == DebugType)
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user