mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Avoid creating and destroying a std::string on every iteration.
llvm-svn: 238343
This commit is contained in:
parent
b5ebbcd330
commit
f8e014d37a
@ -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…
x
Reference in New Issue
Block a user