diff options
-rw-r--r-- | src/libexpr/eval.hh | 4 | ||||
-rw-r--r-- | src/libexpr/get-drvs.hh | 2 | ||||
-rw-r--r-- | src/libexpr/nixexpr.hh | 4 | ||||
-rw-r--r-- | src/libexpr/parser.y | 16 | ||||
-rw-r--r-- | src/libexpr/primops.cc | 2 | ||||
-rw-r--r-- | src/libexpr/value.hh | 6 |
6 files changed, 17 insertions, 17 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index d793e2a31..0a32d5885 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -173,7 +173,7 @@ private: /* A cache from path names to parse trees. */ #if HAVE_BOEHMGC - typedef std::map<Path, Expr *, std::less<Path>, traceable_allocator<std::pair<const Path, Expr *> > > FileParseCache; + typedef std::map<Path, Expr *, std::less<Path>, traceable_allocator<std::pair<const Path, Expr *>>> FileParseCache; #else typedef std::map<Path, Expr *> FileParseCache; #endif @@ -181,7 +181,7 @@ private: /* A cache from path names to values. */ #if HAVE_BOEHMGC - typedef std::map<Path, Value, std::less<Path>, traceable_allocator<std::pair<const Path, Value> > > FileEvalCache; + typedef std::map<Path, Value, std::less<Path>, traceable_allocator<std::pair<const Path, Value>>> FileEvalCache; #else typedef std::map<Path, Value> FileEvalCache; #endif diff --git a/src/libexpr/get-drvs.hh b/src/libexpr/get-drvs.hh index 7cc1abef2..bbd2d3c47 100644 --- a/src/libexpr/get-drvs.hh +++ b/src/libexpr/get-drvs.hh @@ -73,7 +73,7 @@ public: #if HAVE_BOEHMGC -typedef std::list<DrvInfo, traceable_allocator<DrvInfo> > DrvInfos; +typedef std::list<DrvInfo, traceable_allocator<DrvInfo>> DrvInfos; #else typedef std::list<DrvInfo> DrvInfos; #endif diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh index 9b3a9f5d0..8813c61a9 100644 --- a/src/libexpr/nixexpr.hh +++ b/src/libexpr/nixexpr.hh @@ -419,8 +419,8 @@ struct ExprConcatStrings : Expr { PosIdx pos; bool forceString; - std::vector<std::pair<PosIdx, Expr *> > * es; - ExprConcatStrings(const PosIdx & pos, bool forceString, std::vector<std::pair<PosIdx, Expr *> > * es) + std::vector<std::pair<PosIdx, Expr *>> * es; + ExprConcatStrings(const PosIdx & pos, bool forceString, std::vector<std::pair<PosIdx, Expr *>> * es) : pos(pos), forceString(forceString), es(es) { }; PosIdx getPos() const override { return pos; } COMMON_METHODS diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index e3e0ac168..8cbc2da4d 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -193,7 +193,7 @@ static Formals * toFormals(ParseData & data, ParserFormals * formals, static Expr * stripIndentation(const PosIdx pos, SymbolTable & symbols, - std::vector<std::pair<PosIdx, std::variant<Expr *, StringToken> > > & es) + std::vector<std::pair<PosIdx, std::variant<Expr *, StringToken>>> & es) { if (es.empty()) return new ExprString(""); @@ -233,7 +233,7 @@ static Expr * stripIndentation(const PosIdx pos, SymbolTable & symbols, } /* Strip spaces from each line. */ - auto * es2 = new std::vector<std::pair<PosIdx, Expr *> >; + auto * es2 = new std::vector<std::pair<PosIdx, Expr *>>; atStartOfLine = true; size_t curDropped = 0; size_t n = es.size(); @@ -320,8 +320,8 @@ void yyerror(YYLTYPE * loc, yyscan_t scanner, ParseData * data, const char * err StringToken uri; StringToken str; std::vector<nix::AttrName> * attrNames; - std::vector<std::pair<nix::PosIdx, nix::Expr *> > * string_parts; - std::vector<std::pair<nix::PosIdx, std::variant<nix::Expr *, StringToken> > > * ind_string_parts; + std::vector<std::pair<nix::PosIdx, nix::Expr *>> * string_parts; + std::vector<std::pair<nix::PosIdx, std::variant<nix::Expr *, StringToken>>> * ind_string_parts; } %type <e> start expr expr_function expr_if expr_op @@ -415,7 +415,7 @@ expr_op | expr_op UPDATE expr_op { $$ = new ExprOpUpdate(CUR_POS, $1, $3); } | expr_op '?' attrpath { $$ = new ExprOpHasAttr($1, *$3); } | expr_op '+' expr_op - { $$ = new ExprConcatStrings(CUR_POS, false, new std::vector<std::pair<PosIdx, Expr *> >({{makeCurPos(@1, data), $1}, {makeCurPos(@3, data), $3}})); } + { $$ = new ExprConcatStrings(CUR_POS, false, new std::vector<std::pair<PosIdx, Expr *>>({{makeCurPos(@1, data), $1}, {makeCurPos(@3, data), $3}})); } | expr_op '-' expr_op { $$ = new ExprCall(CUR_POS, new ExprVar(data->symbols.create("__sub")), {$1, $3}); } | expr_op '*' expr_op { $$ = new ExprCall(CUR_POS, new ExprVar(data->symbols.create("__mul")), {$1, $3}); } | expr_op '/' expr_op { $$ = new ExprCall(CUR_POS, new ExprVar(data->symbols.create("__div")), {$1, $3}); } @@ -503,9 +503,9 @@ string_parts_interpolated : string_parts_interpolated STR { $$ = $1; $1->emplace_back(makeCurPos(@2, data), new ExprString(std::string($2))); } | string_parts_interpolated DOLLAR_CURLY expr '}' { $$ = $1; $1->emplace_back(makeCurPos(@2, data), $3); } - | DOLLAR_CURLY expr '}' { $$ = new std::vector<std::pair<PosIdx, Expr *> >; $$->emplace_back(makeCurPos(@1, data), $2); } + | DOLLAR_CURLY expr '}' { $$ = new std::vector<std::pair<PosIdx, Expr *>>; $$->emplace_back(makeCurPos(@1, data), $2); } | STR DOLLAR_CURLY expr '}' { - $$ = new std::vector<std::pair<PosIdx, Expr *> >; + $$ = new std::vector<std::pair<PosIdx, Expr *>>; $$->emplace_back(makeCurPos(@1, data), new ExprString(std::string($1))); $$->emplace_back(makeCurPos(@2, data), $3); } @@ -528,7 +528,7 @@ path_start ind_string_parts : ind_string_parts IND_STR { $$ = $1; $1->emplace_back(makeCurPos(@2, data), $2); } | ind_string_parts DOLLAR_CURLY expr '}' { $$ = $1; $1->emplace_back(makeCurPos(@2, data), $3); } - | { $$ = new std::vector<std::pair<PosIdx, std::variant<Expr *, StringToken> > >; } + | { $$ = new std::vector<std::pair<PosIdx, std::variant<Expr *, StringToken>>>; } ; binds diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 11542b06b..aab6919d4 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -574,7 +574,7 @@ struct CompareValues #if HAVE_BOEHMGC -typedef std::list<Value *, gc_allocator<Value *> > ValueList; +typedef std::list<Value *, gc_allocator<Value *>> ValueList; #else typedef std::list<Value *> ValueList; #endif diff --git a/src/libexpr/value.hh b/src/libexpr/value.hh index 58a8a56a0..2008df74d 100644 --- a/src/libexpr/value.hh +++ b/src/libexpr/value.hh @@ -404,9 +404,9 @@ public: #if HAVE_BOEHMGC -typedef std::vector<Value *, traceable_allocator<Value *> > ValueVector; -typedef std::map<Symbol, Value *, std::less<Symbol>, traceable_allocator<std::pair<const Symbol, Value *> > > ValueMap; -typedef std::map<Symbol, ValueVector, std::less<Symbol>, traceable_allocator<std::pair<const Symbol, ValueVector> > > ValueVectorMap; +typedef std::vector<Value *, traceable_allocator<Value *>> ValueVector; +typedef std::map<Symbol, Value *, std::less<Symbol>, traceable_allocator<std::pair<const Symbol, Value *>>> ValueMap; +typedef std::map<Symbol, ValueVector, std::less<Symbol>, traceable_allocator<std::pair<const Symbol, ValueVector>>> ValueVectorMap; #else typedef std::vector<Value *> ValueVector; typedef std::map<Symbol, Value *> ValueMap; |