opentelemetry-cpp icon indicating copy to clipboard operation
opentelemetry-cpp copied to clipboard

[CODE HEALTH] clang-tidy `modernize-use-emplace` warnings

Open dbarker opened this issue 3 months ago • 2 comments

This issue covers resolving the 20 modernize-use-emplace warnings:

clang-tidy warnings (click to expand)
File Line Message
opentelemetry-cpp/api/test/baggage/propagation/baggage_propagator_test.cc 90 use emplace_back instead of push_back
opentelemetry-cpp/api/test/context/propagation/composite_propagator_test.cc 145 use emplace_back instead of push_back
opentelemetry-cpp/api/test/context/runtime_context_test.cc 127 use emplace_back instead of push_back
opentelemetry-cpp/api/test/nostd/shared_ptr_test.cc 224 use emplace_back instead of push_back
opentelemetry-cpp/api/test/trace/propagation/http_text_format_test.cc 265 use emplace_back instead of push_back
opentelemetry-cpp/api/test/trace/propagation/jaeger_propagation_test.cc 194 use emplace_back instead of push_back
opentelemetry-cpp/examples/multithreaded/main.cc 63 use emplace_back instead of push_back
opentelemetry-cpp/exporters/otlp/src/otlp_file_client.cc 568 use emplace_back instead of push_back
opentelemetry-cpp/exporters/otlp/src/otlp_file_client.cc 573 use emplace_back instead of push_back
opentelemetry-cpp/exporters/otlp/src/otlp_file_client.cc 578 use emplace_back instead of push_back
opentelemetry-cpp/ext/include/opentelemetry/ext/http/server/http_server.h 226 use emplace_back instead of push_back
opentelemetry-cpp/ext/include/opentelemetry/ext/http/server/http_server.h 234 use emplace_back instead of push_back
opentelemetry-cpp/ext/include/opentelemetry/ext/http/server/http_server.h 242 use emplace_back instead of push_back
opentelemetry-cpp/ext/include/opentelemetry/ext/http/server/socket_tools.h 629 use emplace_back instead of push_back
opentelemetry-cpp/sdk/test/common/random_test.cc 62 use emplace_back instead of push_back
opentelemetry-cpp/sdk/test/metrics/attributes_hashmap_benchmark.cc 51 use emplace_back instead of push_back
opentelemetry-cpp/sdk/test/metrics/measurements_benchmark.cc 99 use emplace_back instead of push_back
opentelemetry-cpp/sdk/test/metrics/measurements_benchmark.cc 144 use emplace_back instead of push_back
opentelemetry-cpp/sdk/test/metrics/measurements_benchmark.cc 190 use emplace_back instead of push_back
opentelemetry-cpp/sdk/test/metrics/meter_test.cc 112 use emplace_back instead of push_back

Contributes to https://github.com/open-telemetry/opentelemetry-cpp/issues/2053

dbarker avatar Aug 25 '26 02:08 dbarker

This issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles:

github-actions[bot] avatar Aug 25 '26 02:08 github-actions[bot]

Hi @dbarker, I would like to work on this issue .Can you please assign it to me?

ShreyaDubey1001 avatar Aug 25 '26 13:08 ShreyaDubey1001