Fixing code style

Cleaning up this code.
This commit is contained in:
Reason
2023-06-08 18:07:25 -04:00
committed by Martin Michelsen
parent 95346118f0
commit 3ef2f76705
2 changed files with 3 additions and 5 deletions
+2 -4
View File
@@ -1127,13 +1127,11 @@ static void server_command_drop(shared_ptr<ServerState>s, shared_ptr<Lobby> l,
shared_ptr<Client> c, const std::u16string&) { shared_ptr<Client> c, const std::u16string&) {
check_is_game(l, true); check_is_game(l, true);
check_is_leader(l, c); check_is_leader(l, c);
if (s->drops_enabled == true) if (s->drops_enabled == true) {
{
send_text_message(c, u"Drops disabled."); send_text_message(c, u"Drops disabled.");
s->drops_enabled = false; s->drops_enabled = false;
} }
else else {
{
send_text_message(c, u"Drops enabled."); send_text_message(c, u"Drops enabled.");
s->drops_enabled = true; s->drops_enabled = true;
} }
+1 -1
View File
@@ -989,7 +989,7 @@ static bool drop_item(
return true; return true;
} }
static void on_enemy_drop_item_request(shared_ptr<ServerState>s, static void on_enemy_drop_item_request(shared_ptr<ServerState> s,
shared_ptr<Lobby> l, shared_ptr<Client> c, uint8_t command, uint8_t flag, shared_ptr<Lobby> l, shared_ptr<Client> c, uint8_t command, uint8_t flag,
const string& data) { const string& data) {
if (!l->is_game()) { if (!l->is_game()) {