From cbef1e2d634b40ad2e20f7722175f290815744a6 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 21 Jul 2016 16:12:57 -0700 Subject: [PATCH] Mark a couple of local constants as static constexpr Summary: Because they aren't captured, and thus aren't accessible, in the callback used further on in the function. Reviewed By: yfeldblum Differential Revision: D3600874 fbshipit-source-id: 699b3d4caa0a310b1ccc7810d670671850f4366b --- folly/io/async/test/AsyncSSLSocketWriteTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/io/async/test/AsyncSSLSocketWriteTest.cpp b/folly/io/async/test/AsyncSSLSocketWriteTest.cpp index 4235517d..468cf093 100644 --- a/folly/io/async/test/AsyncSSLSocketWriteTest.cpp +++ b/folly/io/async/test/AsyncSSLSocketWriteTest.cpp @@ -351,8 +351,8 @@ TEST_F(AsyncSSLSocketWriteTest, write_with_eor3) { int n = 1; auto vec = makeVec({1600}); int pos = 0; - const size_t initAppBytesWritten = 500; - const size_t appEor = initAppBytesWritten + 1600; + static constexpr size_t initAppBytesWritten = 500; + static constexpr size_t appEor = initAppBytesWritten + 1600; sock_->setAppBytesWritten(initAppBytesWritten); sock_->setEorTracking(true); -- 2.34.1