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:
parent
dce2738a91
commit
3869dd2a13
@ -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_;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user