From c92880e79ec40d520169e11a53eaa4a97cf6a5b8 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 18 Sep 2017 16:38:59 +0200 Subject: [PATCH] src: constify PerformanceEntry data members MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/15458 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Tobias Nießen Reviewed-By: Anna Henningsen --- src/node_perf.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/node_perf.h b/src/node_perf.h index fe5d2d9968..3d9bb144ff 100644 --- a/src/node_perf.h +++ b/src/node_perf.h @@ -94,12 +94,12 @@ class PerformanceEntry : public BaseObject { } private: - Environment* env_; - std::string name_; - std::string type_; - uint64_t startTime_; - uint64_t endTime_; - int data_; + Environment* const env_; + const std::string name_; + const std::string type_; + const uint64_t startTime_; + const uint64_t endTime_; + const int data_; }; static void NotifyObservers(Environment* env, PerformanceEntry* entry); @@ -160,10 +160,10 @@ class PerformanceEntry : public BaseObject { } private: - std::string name_; - std::string type_; - uint64_t startTime_; - uint64_t endTime_; + const std::string name_; + const std::string type_; + const uint64_t startTime_; + const uint64_t endTime_; }; enum PerformanceGCKind {