Skip to content

Commit

Permalink
#575: remove explicit nullptr assignment
Browse files Browse the repository at this point in the history
- Default "all zeros" sufficient; removes the
  apparent need/intent.

  Also, I'm not quite sure that an odd C++ couldn't assign the nullptr
  post-access and before the main method is called.
  C++17 has stronger guarantees.

  "The storage for objects with static storage duration (basic.stc.static) shall be zero-initialized (dcl.init) before any other initialization takes place. Zero-initialization and initialization with a constant expression are collectively called static initialization; ALL OTHER initialization is dynamic initialization..."
  • Loading branch information
pnstickne authored and lifflander committed Nov 25, 2019
1 parent 71cf017 commit 39f6082
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vt/trace/trace_containers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
namespace vt { namespace trace {

/*static*/ TraceContainerEventClassType*
TraceContainers::event_type_container_{nullptr};
TraceContainers::event_type_container_;

/*static*/ TraceContainerEventType*
TraceContainers::event_container_{nullptr};
TraceContainers::event_container_;

}} //end namespace vt::trace

0 comments on commit 39f6082

Please sign in to comment.