ifdef auto_ptr

This commit is contained in:
Alex Fabijanic
2017-10-24 21:55:33 -05:00
parent 87ec631b4a
commit 1a18621ff8
17 changed files with 130 additions and 18 deletions

View File

@@ -257,12 +257,15 @@ protected:
return new Preprocessor(proc, new std::ifstream(pp.getFileName().c_str()), pp.getFileName());
}
}
void parse(const std::string& file)
{
logger().information("Preprocessing " + file);
#ifndef POCO_ENABLE_CPP11
std::auto_ptr<Preprocessor> pPreProc(preprocess(file));
#else
std::unique_ptr<Preprocessor> pPreProc(preprocess(file));
#endif // POCO_ENABLE_CPP11
logger().information("Parsing " + file);
if (pPreProc->stream().good())
{
@@ -271,7 +274,7 @@ protected:
}
else throw Poco::OpenFileException("cannot read from preprocessor");
}
int parseAll()
{
int errors = 0;