libexpr: store ExprConcatStrings elements as direct vector
storing a pointer only adds an unnecessary indirection at runtime. Change-Id: If06dd05effdf1ccb0df0873580f50c775608925d
This commit is contained in:
@@ -331,7 +331,7 @@ struct ExprCall : Expr
|
||||
std::vector<Expr *> args;
|
||||
PosIdx pos;
|
||||
ExprCall(const PosIdx & pos, Expr * fun, std::vector<Expr *> && args)
|
||||
: fun(fun), args(args), pos(pos)
|
||||
: fun(fun), args(std::move(args)), pos(pos)
|
||||
{ }
|
||||
PosIdx getPos() const override { return pos; }
|
||||
COMMON_METHODS
|
||||
@@ -413,9 +413,9 @@ 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)
|
||||
: pos(pos), forceString(forceString), es(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(std::move(es)) { };
|
||||
PosIdx getPos() const override { return pos; }
|
||||
COMMON_METHODS
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user