Skip to content

Commit

Permalink
fixed nits and blatant typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Faber committed Aug 19, 2024
1 parent 304519e commit e1c2280
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/importproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,17 +769,17 @@ bool ImportProject::importVcxproj(const std::string &filename, std::map<std::str
// unless the string starts with $(SolutionDir)
std::string pathToSharedItemsFile;
if (std::string(projectAttribute).rfind("$(SolutionDir)", 0) == 0) {
pathToSharedItemsFile = std::string(projectAttribute);
pathToSharedItemsFile = projectAttribute;
} else {
pathToSharedItemsFile = variables["ProjectDir"] + std::string(projectAttribute);
pathToSharedItemsFile = variables["ProjectDir"] + projectAttribute;
}
if (!simplifyPathWithVariables(pathToSharedItemsFile, variables)) {
printError("Could not simplify path to referenced shared items project");
return false;
}

SharedItemsProject toAdd = importVcxitems(pathToSharedItemsFile, fileFilters, cache);
if (!toAdd.successFull) {
if (!toAdd.successful) {
printError("Could not load shared items project \"" + pathToSharedItemsFile + "\" from original path \"" + std::string(projectAttribute) + "\".");
return false;
}
Expand Down Expand Up @@ -868,7 +868,7 @@ ImportProject::SharedItemsProject ImportProject::importVcxitems(const std::strin
auto isInCacheCheck = [filename](const ImportProject::SharedItemsProject& e) -> bool {
return filename == e.pathToProjectFile;
};
auto iterator = std::find_if(cache.begin(), cache.end(), isInCacheCheck);
const auto iterator = std::find_if(cache.begin(), cache.end(), isInCacheCheck);
if (iterator != std::end(cache)) {
return *iterator;
}
Expand Down Expand Up @@ -920,7 +920,7 @@ ImportProject::SharedItemsProject ImportProject::importVcxitems(const std::strin
}
}

result.successFull = true;
result.successful = true;
cache.emplace_back(result);
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/importproject.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class CPPCHECKLIB WARN_UNUSED ImportProject {

private:
struct SharedItemsProject {
bool successFull;
bool successful;
std::string pathToProjectFile;
std::vector<std::string> includePaths;
std::vector<std::string> sourceFiles;
Expand Down

0 comments on commit e1c2280

Please sign in to comment.