From 61a454f2a19b7b545a973035f289e2ca54920afe Mon Sep 17 00:00:00 2001 From: Shijin Kong Date: Mon, 8 Dec 2014 10:03:30 -0800 Subject: [PATCH] fix local variable shadow Summary: D1720014 line 183 in HHWheelTimer.h broke proxygen/facebook/httpclient clang build: ./folly/io/async/HHWheelTimer.h:183:17: error: declaration shadows a local variable [-Werror,-Wshadow] Wrapper(F fn) : fn_(std::move(fn)) {} ^ ./folly/io/async/HHWheelTimer.h:181:28: note: previous declaration is here void scheduleTimeoutFn(F fn, std::chrono::milliseconds timeout) { I renamed the `fn` in `Wrapper` to `f`. Test Plan: pass Reviewed By: seanc@fb.com Subscribers: njormrod, folly-diffs@, subodh, seanc, kmdent, fma FB internal diff: D1724835 Signature: t1:1724835:1418052896:d9a72230d4fd1a4a734a33142966fe796f4fd362 --- folly/io/async/HHWheelTimer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/io/async/HHWheelTimer.h b/folly/io/async/HHWheelTimer.h index 062544b5..7c6db8a0 100644 --- a/folly/io/async/HHWheelTimer.h +++ b/folly/io/async/HHWheelTimer.h @@ -180,7 +180,7 @@ class HHWheelTimer : private folly::AsyncTimeout, template void scheduleTimeoutFn(F fn, std::chrono::milliseconds timeout) { struct Wrapper : Callback { - Wrapper(F fn) : fn_(std::move(fn)) {} + Wrapper(F f) : fn_(std::move(f)) {} void timeoutExpired() noexcept override { try { fn_(); -- 2.34.1