mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-22 21:09:27 -06:00
Adapt to new auto coding style
This commit is contained in:
@@ -137,7 +137,7 @@ void ServerModule::preSync() {
|
||||
continue;
|
||||
}
|
||||
socket->startStreams();
|
||||
std::shared_ptr<Connection> connection = std::make_shared<Connection>(
|
||||
auto connection = std::make_shared<Connection>(
|
||||
std::move(socket),
|
||||
address,
|
||||
false,
|
||||
|
||||
@@ -130,11 +130,6 @@ void to_json(json& j, const SceneGraphNode& n) {
|
||||
|
||||
{ "subowners", n.propertySubOwners() }
|
||||
};
|
||||
/*
|
||||
auto renderable = n.renderable();
|
||||
if (renderable != nullptr) {
|
||||
j["renderable"] = renderable;
|
||||
}*/
|
||||
|
||||
SceneGraphNode* parent = n.parent();
|
||||
if (parent) {
|
||||
|
||||
@@ -94,7 +94,7 @@ std::unique_ptr<ServerInterface> ServerInterface::createFromDictionary(
|
||||
const ghoul::Dictionary& config)
|
||||
{
|
||||
// TODO: Use documentation to verify dictionary
|
||||
std::unique_ptr<ServerInterface> si = std::make_unique<ServerInterface>(config);
|
||||
auto si = std::make_unique<ServerInterface>(config);
|
||||
return si;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ void AuthorizationTopic::handleJson(const nlohmann::json& json) {
|
||||
}
|
||||
else {
|
||||
try {
|
||||
auto providedKey = json.at("key").get<std::string>();
|
||||
std::string providedKey = json.at("key").get<std::string>();
|
||||
if (authorize(providedKey)) {
|
||||
_connection->setAuthorized(true);
|
||||
_connection->sendJson(wrappedPayload({ KeyStatus, Authorized }));
|
||||
@@ -63,9 +63,11 @@ void AuthorizationTopic::handleJson(const nlohmann::json& json) {
|
||||
else {
|
||||
_connection->sendJson(wrappedPayload({ KeyStatus, IncorrectKey }));
|
||||
}
|
||||
} catch (const std::out_of_range&) {
|
||||
}
|
||||
catch (const std::out_of_range&) {
|
||||
_connection->sendJson(wrappedPayload({ KeyStatus, BadRequest }));
|
||||
} catch (const std::domain_error&) {
|
||||
}
|
||||
catch (const std::domain_error&) {
|
||||
_connection->sendJson(wrappedPayload({ KeyStatus, BadRequest }));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user