summaryrefslogtreecommitdiff
path: root/docs/cpp-code-standards.md
diff options
context:
space:
mode:
authorKitzunu <24550914+Kitzunu@users.noreply.github.com>2023-07-10 22:45:12 +0200
committerGitHub <noreply@github.com>2023-07-10 22:45:12 +0200
commit943499569eda3bac06bd2cf3b60da9aa71b6a846 (patch)
tree0651d5108cd09ef42914c6e96bfc230b80b37f6d /docs/cpp-code-standards.md
parent403e8a2c4c0e925dadfb1b601304cd91707d1b70 (diff)
downloadwiki-943499569eda3bac06bd2cf3b60da9aa71b6a846.tar.gz
wiki-943499569eda3bac06bd2cf3b60da9aa71b6a846.tar.bz2
wiki-943499569eda3bac06bd2cf3b60da9aa71b6a846.zip
Update cpp-code-standards.mdHEADmaster
Diffstat (limited to 'docs/cpp-code-standards.md')
-rw-r--r--docs/cpp-code-standards.md8
1 files changed, 0 insertions, 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.