forked from qt-creator/qt-creator
Use const iterator with std::find_if where possible
Make the resulting interator const. Change-Id: I4aadcfff35f6b1015e506bc75bcfc2a1f1be4d65 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -97,10 +97,10 @@ static QString quickTestSrcDir(const CppTools::CppModelManager *cppMM,
|
||||
if (parts.size() > 0) {
|
||||
const ProjectExplorer::Macros ¯os = parts.at(0)->projectMacros;
|
||||
auto found = std::find_if(
|
||||
macros.begin(),
|
||||
macros.end(),
|
||||
macros.cbegin(),
|
||||
macros.cend(),
|
||||
[] (const ProjectExplorer::Macro ¯o) { return macro.key == "QUICK_TEST_SOURCE_DIR"; });
|
||||
if (found != macros.end()) {
|
||||
if (found != macros.cend()) {
|
||||
QByteArray result = found->value;
|
||||
if (result.startsWith('"'))
|
||||
result.remove(result.length() - 1, 1).remove(0, 1);
|
||||
|
||||
Reference in New Issue
Block a user