Fixed #3684 (Preprocessor: #include handling is searching directories in the wrong order)
This commit is contained in:
parent
f1ebd99dc2
commit
bd734a9610
|
@ -1797,6 +1797,12 @@ Preprocessor::HeaderTypes Preprocessor::getHeaderFileName(std::string &str)
|
|||
*/
|
||||
static bool openHeader(std::string &filename, const std::list<std::string> &includePaths, const std::string &filePath, std::ifstream &fin)
|
||||
{
|
||||
fin.open((filePath + filename).c_str());
|
||||
if (fin.is_open()) {
|
||||
filename = filePath + filename;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::list<std::string> includePaths2(includePaths);
|
||||
includePaths2.push_front("");
|
||||
|
||||
|
@ -1810,12 +1816,6 @@ static bool openHeader(std::string &filename, const std::list<std::string> &incl
|
|||
fin.clear();
|
||||
}
|
||||
|
||||
fin.open((filePath + filename).c_str());
|
||||
if (fin.is_open()) {
|
||||
filename = filePath + filename;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue