From: Christopher Dykes Date: Thu, 21 Jul 2016 23:12:57 +0000 (-0700) Subject: Mark a couple of local constants as static constexpr X-Git-Tag: 2016.07.26~20 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=cbef1e2d634b40ad2e20f7722175f290815744a6;p=folly.git 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 --- 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);