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