Preprocessor: Use Settings::debugwarnings instead of NDEBUG to determine if 'missing system include' should be reported or not

This commit is contained in:
Daniel Marjamaki 2011-04-06 19:49:04 +02:00
parent a5540e8548
commit cb473a48b7
1 changed files with 1 additions and 7 deletions

View File

@ -1910,13 +1910,7 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filePath
}
else if (!fileOpened)
{
// TODO: Fix the handling of system includes and then
// remove the "headerType == UserHeader"
#ifdef NDEBUG
if (headerType == UserHeader && _errorLogger && _settings && _settings->isEnabled("missingInclude"))
#else
if (_errorLogger && _settings && _settings->isEnabled("missingInclude"))
#endif
if (_errorLogger && _settings && ((headerType == UserHeader) && _settings->isEnabled("missingInclude") || _settings->debugwarnings))
{
std::string f = filePath;