mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-01 16:31:45 +00:00
Added Artistic Style 2.02.1 C++ beautifier.
This commit is contained in:
parent
b6308a932f
commit
d40e661b3e
3 changed files with 104 additions and 0 deletions
4
neo/astyle-code.bat
Normal file
4
neo/astyle-code.bat
Normal file
|
@ -0,0 +1,4 @@
|
|||
astyle.exe -v --options=astyle-options.ini --exclude="libs" --recursive *.h
|
||||
astyle.exe -v --options=astyle-options.ini --exclude="libs" --exclude="idlib/math/Simd.cpp" --exclude="game/gamesys/SysCvar.cpp" --exclude="game/gamesys/Callbacks.cpp" --exclude="sys/win32/win_cpu.cpp" --exclude="sys/win32/win_main.cpp" --exclude="sys/win32/win_shared.cpp" --recursive *.cpp
|
||||
|
||||
pause
|
100
neo/astyle-options.ini
Normal file
100
neo/astyle-options.ini
Normal file
|
@ -0,0 +1,100 @@
|
|||
# C++ Ansi-Stil auch Standard für .NET C#
|
||||
--style=ansi
|
||||
|
||||
# Tabs sollten 4 Leerzeichen groß sein
|
||||
--indent=tab=4
|
||||
--indent=force-tab=4
|
||||
|
||||
# case in switches sollte eingerückt sein
|
||||
#switch (foo)
|
||||
#{
|
||||
# case 1:
|
||||
# a += 1;
|
||||
# break;
|
||||
#
|
||||
# case 2:
|
||||
# {
|
||||
# a += 2;
|
||||
# break;
|
||||
# }
|
||||
#}
|
||||
--indent-switches
|
||||
|
||||
# Kommentare sollten nicht mit der ersten Spalte beginnen
|
||||
#void Foo()\n"
|
||||
#{
|
||||
#// comment
|
||||
# if (isFoo)
|
||||
# bar();
|
||||
#}
|
||||
|
||||
#becomes:
|
||||
|
||||
#void Foo()\n"
|
||||
#{
|
||||
# // comment
|
||||
# if (isFoo)
|
||||
# bar();
|
||||
#}
|
||||
#--indent-col1-comments
|
||||
|
||||
|
||||
# Mindestabstand zwischen normalen code und Kontrollblöcken
|
||||
#--break-blocks
|
||||
#--delete-empty-lines
|
||||
|
||||
# Leere Zeilen sollten gleichen Indent haben wie die voherige
|
||||
--fill-empty-lines
|
||||
|
||||
# genug Leerzeichen zwischen Operatoren
|
||||
#if (foo==2)
|
||||
# a=bar((b-c)*a,d--);
|
||||
|
||||
#becomes:
|
||||
|
||||
#if (foo == 2)
|
||||
# a = bar((b - c) * a, d--);
|
||||
--pad-oper
|
||||
|
||||
# Doom 3 verwendet padding innerhalb von Klammern
|
||||
#if ( isFoo( a, b ) )
|
||||
# bar( a, b );
|
||||
--pad-paren-in
|
||||
|
||||
# Doom 3 padded zwischen Headern (e.g. 'if', 'for', 'while'...)
|
||||
#if(isFoo(a, b))
|
||||
# bar(a, b);
|
||||
|
||||
#becomes:
|
||||
|
||||
#if (isFoo(a, b))
|
||||
# bar(a, b);
|
||||
#--pad-header
|
||||
|
||||
|
||||
# Test: entfernte alle extra Leerzeichen zwischen den Klammern
|
||||
#if ( isFoo( a, b ) )
|
||||
# bar ( a, b );
|
||||
|
||||
#becomes (with no padding option requested):
|
||||
|
||||
#if(isFoo(a, b))
|
||||
# bar(a, b);
|
||||
--unpad-paren
|
||||
|
||||
# binde Zeiger und Referenzen an den Typen und nicht an die Variable
|
||||
#char *foo1;
|
||||
#char &foo2;
|
||||
|
||||
#becomes (with align-pointer=type):
|
||||
|
||||
#char* foo1;
|
||||
#char& foo2;
|
||||
--align-pointer=type
|
||||
--align-reference=type
|
||||
|
||||
# keine .orig Backups
|
||||
--suffix=none
|
||||
|
||||
|
||||
|
BIN
neo/astyle.exe
Normal file
BIN
neo/astyle.exe
Normal file
Binary file not shown.
Loading…
Reference in a new issue