mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-22 12:34:24 +00:00
Added C++ syntax highlighting
This commit is contained in:
parent
c7e35d86a2
commit
e7b1caca9e
@ -5,20 +5,22 @@ Please be consistent with the existing coding style.
|
||||
|
||||
Block style:
|
||||
|
||||
bool Function(char* psz, int n)
|
||||
{
|
||||
// Comment summarising what this section of code does
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
// When something fails, return early
|
||||
if (!Something())
|
||||
return false;
|
||||
...
|
||||
}
|
||||
|
||||
// Success return is usually at the end
|
||||
return true;
|
||||
}
|
||||
``` cpp
|
||||
bool Function(char* psz, int n)
|
||||
{
|
||||
// Comment summarising what this section of code does
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
// When something fails, return early
|
||||
if (!Something())
|
||||
return false;
|
||||
...
|
||||
}
|
||||
|
||||
// Success return is usually at the end
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
- ANSI/Allman block style
|
||||
- 4 space indenting, no tabs
|
||||
|
Loading…
x
Reference in New Issue
Block a user