Skip to content

Commit

Permalink
[BUILD] Fix variable shadow (#2498)
Browse files Browse the repository at this point in the history
  • Loading branch information
owent authored Jan 21, 2024
1 parent 2b5c2b4 commit ff13fdd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/include/opentelemetry/nostd/function_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class function_ref<R(Args...)>
void BindTo(F &f) noexcept
{
callable_ = static_cast<void *>(std::addressof(f));
invoker_ = [](void *callable_, Args... args) -> R {
return (*static_cast<FunctionPointer<F>>(callable_))(std::forward<Args>(args)...);
invoker_ = [](void *callable, Args... args) -> R {
return (*static_cast<FunctionPointer<F>>(callable))(std::forward<Args>(args)...);
};
}

Expand All @@ -49,8 +49,8 @@ class function_ref<R(Args...)>
return BindTo(nullptr);
}
callable_ = reinterpret_cast<void *>(f);
invoker_ = [](void *callable_, Args... args) -> R {
return (F(callable_))(std::forward<Args>(args)...);
invoker_ = [](void *callable, Args... args) -> R {
return (F(callable))(std::forward<Args>(args)...);
};
}

Expand Down

2 comments on commit ff13fdd

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp api Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: ff13fdd Previous: 2b5c2b4 Ratio
BM_SpinLockThrashing/4/process_time/real_time 3.5046314095852265 ms/iter 0.7037603855133057 ms/iter 4.98
BM_ProcYieldSpinLockThrashing/1/process_time/real_time 7.5438737869262695 ms/iter 0.0857476421063878 ms/iter 87.98
BM_ProcYieldSpinLockThrashing/2/process_time/real_time 0.4734333667009236 ms/iter 0.1741365846154725 ms/iter 2.72

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp sdk Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: ff13fdd Previous: 2b5c2b4 Ratio
BM_BaselineBuffer/2 12713615.894317627 ns/iter 2410439.0144348145 ns/iter 5.27
BM_BaselineBuffer/4 11474039.554595947 ns/iter 2752260.8120008786 ns/iter 4.17
BM_LockFreeBuffer/2 2762617.1708106995 ns/iter 1182617.425918579 ns/iter 2.34
BM_LockFreeBuffer/4 3869295.439407369 ns/iter 1303261.3262053458 ns/iter 2.97
BM_NoopSpanCreation 307.91162864564785 ns/iter 149.70569893704166 ns/iter 2.06

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.