From ff13fdd92ddef0bfb31fdd37531db599c6759600 Mon Sep 17 00:00:00 2001 From: WenTao Ou Date: Sun, 21 Jan 2024 22:47:56 +0800 Subject: [PATCH] [BUILD] Fix variable shadow (#2498) --- api/include/opentelemetry/nostd/function_ref.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/include/opentelemetry/nostd/function_ref.h b/api/include/opentelemetry/nostd/function_ref.h index edc2007762..1064c966d7 100644 --- a/api/include/opentelemetry/nostd/function_ref.h +++ b/api/include/opentelemetry/nostd/function_ref.h @@ -35,8 +35,8 @@ class function_ref void BindTo(F &f) noexcept { callable_ = static_cast(std::addressof(f)); - invoker_ = [](void *callable_, Args... args) -> R { - return (*static_cast>(callable_))(std::forward(args)...); + invoker_ = [](void *callable, Args... args) -> R { + return (*static_cast>(callable))(std::forward(args)...); }; } @@ -49,8 +49,8 @@ class function_ref return BindTo(nullptr); } callable_ = reinterpret_cast(f); - invoker_ = [](void *callable_, Args... args) -> R { - return (F(callable_))(std::forward(args)...); + invoker_ = [](void *callable, Args... args) -> R { + return (F(callable))(std::forward(args)...); }; }