Added loop iterator style (#7092)
Co-authored-by: Hedara <hedara90@gmail.com>
This commit is contained in:
parent
5586b0c216
commit
0834d9d80b
@ -265,6 +265,15 @@ void SetCurrentDifficultyLevel(enum DifficultyLevel desiredDifficulty)
|
||||
.power = B_UPDATED_MOVE_DATA >= GEN_6 ? 45 : 35,
|
||||
},
|
||||
```
|
||||
### Variable Declarations
|
||||
Loop iterators should be declared as part of the loop unless there's a very good reason not to.
|
||||
```C
|
||||
for (u32 i = 0; i < LOOP_ITERATIONS; i++)
|
||||
{
|
||||
dst1[i] = i;
|
||||
dst2[i] = i;
|
||||
}
|
||||
```
|
||||
## Data Type Sizes
|
||||
When a variable number is used, the data type should generally `u32` (unsigned) or `s32` (signed). There are a few exceptions to this rule, such as:
|
||||
* Values stored in the saveblock should use the smallest data type possible.
|
||||
@ -350,7 +359,7 @@ enum DifficultyLevel GetCurrentDifficultyLevel(void)
|
||||
}
|
||||
```
|
||||
|
||||
### Data file format
|
||||
## Data file format
|
||||
|
||||
External data files should use JSON.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user