forked from OSchip/llvm-project
cpp11-migrate: const-correcting IncludeExcludeInfo
isFileIncluded() needed to be marked const. llvm-svn: 183918
This commit is contained in:
parent
90706dd424
commit
230ecb2422
|
@ -103,10 +103,10 @@ error_code IncludeExcludeInfo::readListFromFile(StringRef IncludeListFile,
|
|||
return error_code::success();
|
||||
}
|
||||
|
||||
bool IncludeExcludeInfo::isFileIncluded(StringRef FilePath) {
|
||||
bool IncludeExcludeInfo::isFileIncluded(StringRef FilePath) const {
|
||||
bool InIncludeList = false;
|
||||
|
||||
for (std::vector<std::string>::iterator I = IncludeList.begin(),
|
||||
for (std::vector<std::string>::const_iterator I = IncludeList.begin(),
|
||||
E = IncludeList.end();
|
||||
I != E; ++I)
|
||||
if ((InIncludeList = fileHasPathPrefix(FilePath, *I)))
|
||||
|
@ -116,7 +116,7 @@ bool IncludeExcludeInfo::isFileIncluded(StringRef FilePath) {
|
|||
if (!InIncludeList)
|
||||
return false;
|
||||
|
||||
for (std::vector<std::string>::iterator I = ExcludeList.begin(),
|
||||
for (std::vector<std::string>::const_iterator I = ExcludeList.begin(),
|
||||
E = ExcludeList.end();
|
||||
I != E; ++I)
|
||||
if (fileHasPathPrefix(FilePath, *I))
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
|
||||
/// \brief Determine if the given path is in the list of include paths but
|
||||
/// not in the list of exclude paths.
|
||||
bool isFileIncluded(llvm::StringRef FilePath);
|
||||
bool isFileIncluded(llvm::StringRef FilePath) const;
|
||||
|
||||
private:
|
||||
std::vector<std::string> IncludeList;
|
||||
|
|
Loading…
Reference in New Issue