Adapt to new auto coding style

This commit is contained in:
Alexander Bock
2022-02-10 15:20:21 +01:00
parent 0e49606706
commit 30212b6768
58 changed files with 446 additions and 404 deletions

View File

@@ -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,

View File

@@ -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) {

View File

@@ -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;
}

View File

@@ -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 }));
}
}