Skip to content

Commit

Permalink
src: return references from getters, not copies
Browse files Browse the repository at this point in the history
PR-URL: #15458
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
bnoordhuis authored and BridgeAR committed Sep 21, 2017
1 parent dce2738 commit 3869dd2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/node_perf.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ class PerformanceEntry : public BaseObject {
return env_;
}

std::string name() const {
const std::string& name() const {
return name_;
}

std::string type() const {
const std::string& type() const {
return type_;
}

Expand Down Expand Up @@ -135,11 +135,11 @@ class PerformanceEntry : public BaseObject {

~PerformanceEntry() {}

std::string name() const {
const std::string& name() const {
return name_;
}

std::string type() const {
const std::string& type() const {
return type_;
}

Expand Down

0 comments on commit 3869dd2

Please sign in to comment.