diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2016-01-10 02:45:29 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2016-01-10 02:50:54 +0300 |
commit | d330162ba6981a6c3691bcc8759215463d47f973 (patch) | |
tree | aec48fd44e8b250cb5d99720c11deba92b4f1c3d /intern | |
parent | 64df7a2b3848e71f56b3f5243e1352cd05ef70eb (diff) |
Cycles: Fix Uninitialized Value compiler warning in the scoped_timer
Although the code made it impossible to use time_start_ uninitialized, at least GCC did
still produce multiple warnings about it.
Since time_dt() is an extremely cheap operation and functionality does not change in any way when
removing the check in the constructor, this commit removes the check and therefore the warning.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/util/util_time.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/intern/cycles/util/util_time.h b/intern/cycles/util/util_time.h index e2f7ca2baa1..9cd52d5f11a 100644 --- a/intern/cycles/util/util_time.h +++ b/intern/cycles/util/util_time.h @@ -31,9 +31,7 @@ class scoped_timer { public: scoped_timer(double *value) : value_(value) { - if(value_ != NULL) { - time_start_ = time_dt(); - } + time_start_ = time_dt(); } ~scoped_timer() |