From 8a9e0b027db39d2ecc3bf4636892f0c412bc9d7d Mon Sep 17 00:00:00 2001 From: Mordred <30826167+SapphireMordred@users.noreply.github.com> Date: Thu, 30 Aug 2018 11:39:39 +0200 Subject: [PATCH 1/2] Updated .editorconfig for 2 spaces --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 84678469..a67d46ec 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,7 +3,7 @@ root = true # find plugin for your editor here: http://editorconfig.org/#download [*.{cpp,h,chai,inc}] indent_style = space -indent_size = 3 +indent_size = 2 end_of_line = lf trim_trailing_whitespace = true indent_brace_style = Allman From 7655f4ca6355dcc10a1627e83a8140bee87b48ea Mon Sep 17 00:00:00 2001 From: Mordred <30826167+SapphireMordred@users.noreply.github.com> Date: Thu, 30 Aug 2018 13:31:33 +0200 Subject: [PATCH 2/2] Update CONTRIBUTING.md --- CONTRIBUTING.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index da0c7441..b50b5c62 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,7 +22,7 @@ When making a PR, please make sure that it follows our style guidelines and good ### Coding style -Indentations are Allman-style based, 3-space, no tabs. +Indentations are Allman-style based, 2-space, no tabs. Space between arguments in function calls, as well as for types. Example (shortened from ActionHandler.cpp): @@ -30,30 +30,30 @@ Example (shortened from ActionHandler.cpp): ```cpp switch( commandId ) { - case 0x01: // Toggle sheathe - { - if ( param11 == 1 ) - pPlayer->setStance( Entity::Chara::Stance::Active ); - else - { - pPlayer->setStance( Entity::Chara::Stance::Passive ); - pPlayer->setAutoattack( false ); - } + case 0x01: // Toggle sheathe + { + if ( param11 == 1 ) + pPlayer->setStance( Entity::Chara::Stance::Active ); + else + { + pPlayer->setStance( Entity::Chara::Stance::Passive ); + pPlayer->setAutoattack( false ); + } - pPlayer->sendToInRangeSet( ActorControlPacket142( pPlayer->getId(), 0, param11, 1 ) ); + pPlayer->sendToInRangeSet( ActorControlPacket142( pPlayer->getId(), 0, param11, 1 ) ); - break; - } - case 0x03: // Change target - { - uint64_t targetId = inPacket.getValAt< uint64_t >( 0x24 ); - pPlayer->changeTarget( targetId ); - break; - } - default: - { - break; - } + break; + } + case 0x03: // Change target + { + uint64_t targetId = inPacket.getValAt< uint64_t >( 0x24 ); + pPlayer->changeTarget( targetId ); + break; + } + default: + { + break; + } } ```