X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FParser.cpp;h=25a99b6d2314dbc7f7e6e591e80dee875a040b2e;hb=5cca794c5b6549b7750c88b5c2217d659fa963dd;hp=89e3931e9529ccdf2dd4ce3c6a5fae6544a1cd35;hpb=d8cbd000400a1d6f9fcf77e414b6b4d13b1ead96;p=l2e.git diff --git a/src/loader/Parser.cpp b/src/loader/Parser.cpp index 89e3931..25a99b6 100644 --- a/src/loader/Parser.cpp +++ b/src/loader/Parser.cpp @@ -3,12 +3,12 @@ #include "ParsedSource.h" #include "utility.h" -#include #include +#include #include #include -using std::auto_ptr; +using std::unique_ptr; using std::ifstream; using std::string; using std::vector; @@ -87,14 +87,14 @@ Declaration *Parser::ProbeDefinition() { Token t(GetToken()); tok.Putback(t); if (BeginOfPropertyList(t)) { - auto_ptr propertyList(ParsePropertyList()); - auto_ptr dfn(new Definition(typeName, identifier)); + unique_ptr propertyList(ParsePropertyList()); + unique_ptr dfn(new Definition(typeName, identifier)); dfn->SetValue(propertyList.release()); product.AddDefinition(dfn.get()); return dfn.release(); } else if (BeginningOfPrimitiveLiteral(t)) { - auto_ptr literal(ParseLiteral()); - auto_ptr dfn(new Definition(typeName, identifier)); + unique_ptr literal(ParseLiteral()); + unique_ptr dfn(new Definition(typeName, identifier)); dfn->SetValue(literal.release()); product.AddDefinition(dfn.get()); return dfn.release(); @@ -182,7 +182,7 @@ PropertyList *Parser::ParsePropertyList() { Token t(GetToken()); AssertTokenType(t.type, Token::ANGLE_BRACKET_OPEN); - auto_ptr props(new PropertyList); + unique_ptr props(new PropertyList); while (t.type != Token::ANGLE_BRACKET_CLOSE) { Token name(GetToken());