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 authored and Ruben Bridgewater committed 2017-09-21 19:18:56 -03:00
1 parent dce2738a91
commit 3869dd2a13
1 file changed
+4 -4
+4 -4
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_;
}