From 943499569eda3bac06bd2cf3b60da9aa71b6a846 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Mon, 10 Jul 2023 22:45:12 +0200 Subject: Update cpp-code-standards.md --- docs/cpp-code-standards.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/cpp-code-standards.md b/docs/cpp-code-standards.md index f5625a0..3bf6e91 100644 --- a/docs/cpp-code-standards.md +++ b/docs/cpp-code-standards.md @@ -77,13 +77,9 @@ if (var) me->DoB(); } else -{ me->DoC(); -} ``` -**Please note that brackets should always start on a new line, as displayed in the example above.** - ### Loop syntax ```cpp @@ -117,18 +113,14 @@ Wrong: ```cpp if (player->GetQuestStatus(10090) == 1) -{ me->RemoveFlag(58, 2); -} ``` Correct: ```cpp if (player->GetQuestStatus(QUEST_BEAT_UP) == QUEST_STATUS_INCOMPLETE) -{ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); -} ``` Constants are set with #defines, constexpr, or enum/enum class. If it does not exist - create one. -- cgit