src: return references from getters, not copies

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Ben Noordhuis 2017-09-18 16:38:59 +02:00 committed by Ruben Bridgewater
parent dce2738a91
commit 3869dd2a13
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -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_;
}
@ -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_;
}