Merge topic 'minor-cleanups'
80bda168 Simplify use of binary_search. 1927e4ba Remove const char string comparison helper.
This commit is contained in:
commit
d8dde37d60
@ -519,9 +519,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
|
|||||||
iter = this->SystemIncludesCache.insert(entry).first;
|
iter = this->SystemIncludesCache.insert(entry).first;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string dirString = dir;
|
return std::binary_search(iter->second.begin(), iter->second.end(), dir);
|
||||||
return std::binary_search(iter->second.begin(), iter->second.end(),
|
|
||||||
dirString);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -462,12 +462,6 @@ struct cmStrCmp {
|
|||||||
return strcmp(input, m_test.c_str()) == 0;
|
return strcmp(input, m_test.c_str()) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For use with binary_search
|
|
||||||
bool operator()(const char *str1, const char *str2) const
|
|
||||||
{
|
|
||||||
return strcmp(str1, str2) < 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const std::string m_test;
|
const std::string m_test;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user