Skip to content

Commit

Permalink
src: remove unnecessary copy operations in tracing
Browse files Browse the repository at this point in the history
PR-URL: #20356
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
  • Loading branch information
addaleax authored and MylesBorins committed May 4, 2018
1 parent 3962c73 commit 31812ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_trace_events.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void NodeCategorySet::Enable(const FunctionCallbackInfo<Value>& args) {
NodeCategorySet* category_set;
ASSIGN_OR_RETURN_UNWRAP(&category_set, args.Holder());
CHECK_NE(category_set, nullptr);
auto categories = category_set->GetCategories();
const auto& categories = category_set->GetCategories();
if (!category_set->enabled_ && !categories.empty()) {
env->tracing_agent()->Enable(categories);
category_set->enabled_ = true;
Expand All @@ -75,7 +75,7 @@ void NodeCategorySet::Disable(const FunctionCallbackInfo<Value>& args) {
NodeCategorySet* category_set;
ASSIGN_OR_RETURN_UNWRAP(&category_set, args.Holder());
CHECK_NE(category_set, nullptr);
auto categories = category_set->GetCategories();
const auto& categories = category_set->GetCategories();
if (category_set->enabled_ && !categories.empty()) {
env->tracing_agent()->Disable(categories);
category_set->enabled_ = false;
Expand Down

0 comments on commit 31812ed

Please sign in to comment.