]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add some missing initializations to Timer. 3449/head
authorDavid Wells <wellsd2@rpi.edu>
Fri, 4 Nov 2016 11:22:56 +0000 (07:22 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Fri, 4 Nov 2016 11:22:56 +0000 (07:22 -0400)
Some of these were caught by PVS studio.

source/base/timer.cc

index 331144ce61321b548c3e0fb666be8584343088df..a9f0f7e401adb22500f886ee88753fe01d46d1db 100644 (file)
@@ -41,8 +41,13 @@ DEAL_II_NAMESPACE_OPEN
 // current process
 Timer::Timer()
   :
+  start_time (0.),
+  start_time_children (0.),
+  start_wall_time (0.),
   cumulative_time (0.),
-  cumulative_wall_time (0.)
+  cumulative_wall_time (0.),
+  last_lap_time (0.),
+  running (false)
 #ifdef DEAL_II_WITH_MPI
   , mpi_communicator (MPI_COMM_SELF)
   , sync_wall_time (false)
@@ -59,8 +64,13 @@ Timer::Timer()
 Timer::Timer(MPI_Comm mpi_communicator,
              bool sync_wall_time_)
   :
+  start_time (0.),
+  start_time_children (0.),
+  start_wall_time (0.),
   cumulative_time (0.),
   cumulative_wall_time (0.),
+  last_lap_time (0.),
+  running (false),
   mpi_communicator (mpi_communicator),
   sync_wall_time(sync_wall_time_)
 {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.