From cd927a9e490c4bef6b9d113e35b4337fb500a542 Mon Sep 17 00:00:00 2001 From: Andrey Goder Date: Wed, 1 Jul 2015 10:37:34 -0700 Subject: [PATCH] fix? AutoTimerTest Summary: Apparently this test sometimes fails. @Gownta suggests it's because we're storing temproaries in StringPiece. Change it to store in a std::string, which should hopefully fix it. Reviewed By: @Gownta Differential Revision: D2208643 --- folly/experimental/test/AutoTimerTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/folly/experimental/test/AutoTimerTest.cpp b/folly/experimental/test/AutoTimerTest.cpp index 2c54a04a..e7ce057a 100644 --- a/folly/experimental/test/AutoTimerTest.cpp +++ b/folly/experimental/test/AutoTimerTest.cpp @@ -22,14 +22,14 @@ using namespace std; struct StubLogger { void operator()(StringPiece msg, double sec) { - m = msg; + m = msg.str(); t = sec; } - static StringPiece m; + static std::string m; static double t; }; -StringPiece StubLogger::m = ""; +std::string StubLogger::m = ""; double StubLogger::t = 0; struct StubClock { -- 2.34.1