Commit 2dfc09df authored by Dan Melnic's avatar Dan Melnic Committed by Facebook Github Bot

Pass StringPiece by value

Reviewed By: yfeldblum

Differential Revision: D16785914

fbshipit-source-id: 73ade28f7aa300ce5e278e2ff2f56f4aafef9533
parent 68850b9b
......@@ -49,7 +49,7 @@ static void run(
ScopedEventBaseThread::ScopedEventBaseThread()
: ScopedEventBaseThread(nullptr, "") {}
ScopedEventBaseThread::ScopedEventBaseThread(const StringPiece& name)
ScopedEventBaseThread::ScopedEventBaseThread(StringPiece name)
: ScopedEventBaseThread(nullptr, name) {}
ScopedEventBaseThread::ScopedEventBaseThread(EventBaseManager* ebm)
......@@ -57,7 +57,7 @@ ScopedEventBaseThread::ScopedEventBaseThread(EventBaseManager* ebm)
ScopedEventBaseThread::ScopedEventBaseThread(
EventBaseManager* ebm,
const StringPiece& name)
StringPiece name)
: ebm_(ebm ? ebm : EventBaseManager::get()) {
new (&eb_) EventBase();
th_ = thread(run, ebm_, &eb_, &stop_, name);
......
......@@ -39,11 +39,9 @@ typedef Range<const char*> StringPiece;
class ScopedEventBaseThread : public IOExecutor, public SequencedExecutor {
public:
ScopedEventBaseThread();
explicit ScopedEventBaseThread(const StringPiece& name);
explicit ScopedEventBaseThread(StringPiece name);
explicit ScopedEventBaseThread(EventBaseManager* ebm);
explicit ScopedEventBaseThread(
EventBaseManager* ebm,
const StringPiece& name);
explicit ScopedEventBaseThread(EventBaseManager* ebm, StringPiece name);
~ScopedEventBaseThread();
EventBase* getEventBase() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment