Merge pull request #1969 from proller/fix8

Fix gcc "may be used uninitialized" warning
This commit is contained in:
alexey-milovidov 2018-02-26 23:20:23 +03:00 committed by GitHub
commit a36d683e4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,10 +39,10 @@ public:
double elapsedSeconds() const { return static_cast<double>(elapsed()) / 1000000000ULL; } double elapsedSeconds() const { return static_cast<double>(elapsed()) / 1000000000ULL; }
private: private:
UInt64 start_ns; UInt64 start_ns = 0;
UInt64 stop_ns; UInt64 stop_ns = 0;
clockid_t clock_type; clockid_t clock_type;
bool is_running; bool is_running = false;
UInt64 nanoseconds() const { return StopWatchDetail::nanoseconds(clock_type); } UInt64 nanoseconds() const { return StopWatchDetail::nanoseconds(clock_type); }
}; };