fix(telemetry): satisfy clang-tidy const-correctness and redundant-parens

CI enabled more clang-tidy checks via the upstream merge:
- DiscardScope discardScope -> const (misc-const-correctness)
- drop the (::max)() Windows macro-guard parens; NOMINMAX is defined
  project-wide so the bare form is correct (readability-redundant-parentheses)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-06-26 17:37:37 +01:00
parent cf629e2a76
commit 498bc3ee96
2 changed files with 3 additions and 4 deletions

View File

@@ -361,7 +361,7 @@ SpanGuard::discard()
// flag leak-proof if a later phase can hand back a non-recording
// span (e.g. honoring a non-sampled remote parent during
// propagation), so it can never spill onto the next span.
DiscardScope discardScope;
DiscardScope const discardScope;
impl_->span->End();
}
impl_->span = nullptr; // prevent ~Impl from calling End() again

View File

@@ -131,14 +131,13 @@ public:
bool
ForceFlush(
std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override
std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override
{
return delegate_->ForceFlush(timeout);
}
bool
Shutdown(
std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override
Shutdown(std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override
{
return delegate_->Shutdown(timeout);
}