We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c3017b commit 1f2bfe4Copy full SHA for 1f2bfe4
1 file changed
sdk/src/trace/tracer_context.cc
@@ -85,13 +85,11 @@ void TracerContext::AddProcessor(std::unique_ptr<SpanProcessor> processor) noexc
85
else if (multi_processor_ == nullptr)
86
{
87
// a processor exists, but it's not a MultiSpanProcessor. make a new MultiSpanProcessor
88
- std::unique_ptr<MultiSpanProcessor> multi_processor(new MultiSpanProcessor({}));
+ multi_processor_ = new MultiSpanProcessor({});
89
+ std::unique_ptr<MultiSpanProcessor> multi_processor(multi_processor_);
90
multi_processor->AddProcessor(std::move(processor_));
91
multi_processor->AddProcessor(std::move(processor));
92
- // duplicate the pointer before it gets type erased
93
- multi_processor_ = multi_processor.get();
94
-
95
processor_ = std::move(multi_processor);
96
}
97
else /*if (multi_processor_ != nullptr)*/
0 commit comments