Mark a couple of local constants as static constexpr
authorChristopher Dykes <cdykes@fb.com>
Thu, 21 Jul 2016 23:12:57 +0000 (16:12 -0700)
committerFacebook Github Bot 6 <facebook-github-bot-6-bot@fb.com>
Thu, 21 Jul 2016 23:23:35 +0000 (16:23 -0700)
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

index 4235517d38790401ab5b7ad5c3585dcac8a85f9c..468cf093f9586202fa2af7730cbd46319c1f8fe1 100644 (file)
@@ -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);