Browse Source

tracing: fix -Wreorder warning

Initialize `InternalTraceBuffer::id_` the last.

PR-URL: https://github.com/nodejs/node/pull/10416
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v6
Santiago Gimeno 8 years ago
parent
commit
0f24bdd781
No known key found for this signature in database GPG Key ID: F28C3C8DA33C03BE
  1. 5
      src/tracing/node_trace_buffer.cc

5
src/tracing/node_trace_buffer.cc

@ -5,8 +5,9 @@ namespace tracing {
InternalTraceBuffer::InternalTraceBuffer(size_t max_chunks, uint32_t id,
NodeTraceWriter* trace_writer, NodeTraceBuffer* external_buffer)
: id_(id), flushing_(false), max_chunks_(max_chunks),
trace_writer_(trace_writer), external_buffer_(external_buffer) {
: flushing_(false), max_chunks_(max_chunks),
trace_writer_(trace_writer), external_buffer_(external_buffer),
id_(id) {
chunks_.resize(max_chunks);
}

Loading…
Cancel
Save