Skip to content

Commit 8ef6764

Browse files
authored
Fix class member initialization order (#1360)
1 parent f314522 commit 8ef6764

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

exporters/etw/include/opentelemetry/exporters/etw/etw_tracer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -761,10 +761,10 @@ class Span : public opentelemetry::trace::Span
761761
const opentelemetry::trace::StartSpanOptions &options,
762762
Span *parent = nullptr) noexcept
763763
: opentelemetry::trace::Span(),
764+
start_time_(std::chrono::system_clock::now()),
764765
owner_(owner),
765766
parent_(parent),
766-
context_(CreateContext()),
767-
start_time_(std::chrono::system_clock::now())
767+
context_(CreateContext())
768768
{
769769
name_ = name;
770770
UNREFERENCED_PARAMETER(options);

sdk/src/metrics/meter.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace nostd = opentelemetry::nostd;
2828
Meter::Meter(std::shared_ptr<MeterContext> meter_context,
2929
std::unique_ptr<sdk::instrumentationlibrary::InstrumentationLibrary>
3030
instrumentation_library) noexcept
31-
: meter_context_{meter_context}, instrumentation_library_{std::move(instrumentation_library)}
31+
: instrumentation_library_{std::move(instrumentation_library)}, meter_context_{meter_context}
3232
{}
3333

3434
nostd::shared_ptr<metrics::Counter<long>> Meter::CreateLongCounter(nostd::string_view name,

0 commit comments

Comments
 (0)