mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix clang-tidy modernize-use-emplace warnings in headers
This commit is contained in:
parent
fb55c8856e
commit
cb78d2202f
4 changed files with 5 additions and 7 deletions
|
@ -292,7 +292,7 @@ public:
|
||||||
// Adds to the trace an update for the given value.
|
// Adds to the trace an update for the given value.
|
||||||
void AddDelta(ValPtr val, std::string rhs, bool needs_lhs, bool is_first_def) {
|
void AddDelta(ValPtr val, std::string rhs, bool needs_lhs, bool is_first_def) {
|
||||||
auto& d = is_post ? post_deltas : deltas;
|
auto& d = is_post ? post_deltas : deltas;
|
||||||
d.emplace_back(DeltaGen(val, rhs, needs_lhs, is_first_def));
|
d.emplace_back(val, rhs, needs_lhs, is_first_def);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initially we analyze events pre-execution. When this flag
|
// Initially we analyze events pre-execution. When this flag
|
||||||
|
|
|
@ -165,12 +165,10 @@ public:
|
||||||
// stack of location so that the most recent is always the one that
|
// stack of location so that the most recent is always the one that
|
||||||
// will be assumed to be the current one. The pointer must remain
|
// will be assumed to be the current one. The pointer must remain
|
||||||
// valid until the location is popped.
|
// valid until the location is popped.
|
||||||
void PushLocation(const detail::Location* location) {
|
void PushLocation(const detail::Location* location) { locations.emplace_back(location, nullptr); }
|
||||||
locations.push_back(std::pair<const detail::Location*, const detail::Location*>(location, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
void PushLocation(const detail::Location* loc1, const detail::Location* loc2) {
|
void PushLocation(const detail::Location* loc1, const detail::Location* loc2) {
|
||||||
locations.push_back(std::pair<const detail::Location*, const detail::Location*>(loc1, loc2));
|
locations.emplace_back(loc1, loc2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Removes the top-most location information from stack.
|
// Removes the top-most location information from stack.
|
||||||
|
|
|
@ -88,7 +88,7 @@ eval EvalIndexAnyVec($$, $1, $2)
|
||||||
|
|
||||||
macro WhenIndexResCheck(vec)
|
macro WhenIndexResCheck(vec)
|
||||||
if ( vec && IndexExprWhen::evaluating > 0 )
|
if ( vec && IndexExprWhen::evaluating > 0 )
|
||||||
IndexExprWhen::results.push_back({NewRef{}, vec});
|
IndexExprWhen::results.emplace_back(NewRef{}, vec);
|
||||||
|
|
||||||
internal-op When-Index-Vec
|
internal-op When-Index-Vec
|
||||||
class VVV
|
class VVV
|
||||||
|
|
|
@ -95,7 +95,7 @@ eval auto vv = $1.AsVector();
|
||||||
vv->Assign(0, $2.ToVal(Z_TYPE));
|
vv->Assign(0, $2.ToVal(Z_TYPE));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vv->RawVec().push_back(CopyVal($2));
|
vv->RawVec().emplace_back(CopyVal($2));
|
||||||
vv->Modified();
|
vv->Modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue