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 MylesBorins committed Oct 3, 2017
1 parent aded597 commit e72761a
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 @@ -70,11 +70,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 @@ -132,11 +132,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 e72761a

Please sign in to comment.