Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions example/calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class InitImpl : public Init
}
};

void LogPrint(bool raise, std::string message)
void LogPrint(bool raise, const std::string& message)
{
if (raise) throw std::runtime_error(std::move(message));
if (raise) throw std::runtime_error(message);
std::ofstream("debug.log", std::ios_base::app) << message << std::endl;
}

Expand Down
4 changes: 2 additions & 2 deletions example/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ auto Spawn(mp::EventLoop& loop, const std::string& process_argv0, const std::str
return std::make_tuple(mp::ConnectStream<InitInterface>(loop, fd), pid);
}

void LogPrint(bool raise, std::string message)
void LogPrint(bool raise, const std::string& message)
{
if (raise) throw std::runtime_error(std::move(message));
if (raise) throw std::runtime_error(message);
std::ofstream("debug.log", std::ios_base::app) << message << std::endl;
}

Expand Down
4 changes: 2 additions & 2 deletions example/printer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class InitImpl : public Init
std::unique_ptr<Printer> makePrinter() override { return std::make_unique<PrinterImpl>(); }
};

void LogPrint(bool raise, std::string message)
void LogPrint(bool raise, const std::string& message)
{
if (raise) throw std::runtime_error(std::move(message));
if (raise) throw std::runtime_error(message);
std::ofstream("debug.log", std::ios_base::app) << message << std::endl;
}

Expand Down
2 changes: 1 addition & 1 deletion include/mp/proxy-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ auto PassField(Priority<1>, TypeList<>, ServerContext& server_context, const Fn&

auto thread_client = context_arg.getThread();
return JoinPromises(server.m_context.connection->m_threads.getLocalServer(thread_client)
.then([&server, invoke, req](kj::Maybe<Thread::Server&> perhaps) {
.then([&server, invoke, req](const kj::Maybe<Thread::Server&>& perhaps) {
KJ_IF_MAYBE(thread_server, perhaps)
{
const auto& thread = static_cast<ProxyServer<Thread>&>(*thread_server);
Expand Down