Auto-format FlipperClient.cpp

Reviewed By: passy

Differential Revision: D17601356

fbshipit-source-id: 04701b409a838ad4dac54ae7c4f5f97cfa574dbe
This commit is contained in:
John Knox
2019-09-27 02:55:46 -07:00
committed by Facebook Github Bot
parent 6796a87e76
commit 74b9ba5c40

View File

@@ -170,9 +170,9 @@ void FlipperClient::onDisconnected() {
void FlipperClient::onMessageReceived(
const dynamic& message,
std::unique_ptr<FlipperResponder> uniqueResponder) {
// Convert to shared pointer so we can hold on to it while passing it to the plugin, and still use it
// to respond with an error if we catch an exception.
std::shared_ptr<FlipperResponder> responder = std::move(uniqueResponder);
// Convert to shared pointer so we can hold on to it while passing it to the
// plugin, and still use it to respond with an error if we catch an exception.
std::shared_ptr<FlipperResponder> responder = std::move(uniqueResponder);
try {
std::lock_guard<std::mutex> lock(mutex_);
const auto& method = message["method"];
@@ -237,9 +237,7 @@ void FlipperClient::onMessageReceived(
}
const auto& conn = connections_.at(params["api"].getString());
conn->call(
params["method"].getString(),
params.getDefault("params"),
responder);
params["method"].getString(), params.getDefault("params"), responder);
return;
}