Skip to content

Commit fd1a892

Browse files
bnoordhuisMylesBorins
authored andcommitted
src: constify PerformanceEntry data members
PR-URL: #15458 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent e72761a commit fd1a892

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/node_perf.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ class PerformanceEntry : public BaseObject {
9191
}
9292

9393
private:
94-
Environment* env_;
95-
std::string name_;
96-
std::string type_;
97-
uint64_t startTime_;
98-
uint64_t endTime_;
99-
int data_;
94+
Environment* const env_;
95+
const std::string name_;
96+
const std::string type_;
97+
const uint64_t startTime_;
98+
const uint64_t endTime_;
99+
const int data_;
100100
};
101101

102102
static void NotifyObservers(Environment* env, PerformanceEntry* entry);
@@ -157,10 +157,10 @@ class PerformanceEntry : public BaseObject {
157157
}
158158

159159
private:
160-
std::string name_;
161-
std::string type_;
162-
uint64_t startTime_;
163-
uint64_t endTime_;
160+
const std::string name_;
161+
const std::string type_;
162+
const uint64_t startTime_;
163+
const uint64_t endTime_;
164164
};
165165

166166
enum PerformanceGCKind {

0 commit comments

Comments
 (0)