Commit 38a8be1f authored by Craig Scott's avatar Craig Scott
Browse files

Cleanup: Fix minor cppcheck warning

The code is functionally the same after this change, but it prevents the
cppcheck warning: Searching before insertion is not necessary
parent cc94429c
......@@ -687,8 +687,7 @@ void cmInstallTargetGenerator::AddChrpathPatchRule(
std::string runpath =
mf->GetGlobalGenerator()->ExpandCFGIntDir(i, config);
if (runpaths.find(runpath) == runpaths.end()) {
runpaths.insert(runpath);
if (runpaths.insert(runpath).second) {
os << indent << "execute_process(COMMAND " << installNameTool
<< "\n";
os << indent << " -delete_rpath \"" << runpath << "\"\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment