Skip to content

Commit 6626d58

Browse files
committed
clang-format all the things
1 parent 3cc7601 commit 6626d58

33 files changed

+8482
-9644
lines changed

.clang-format

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
BasedOnStyle: Google
2+
IndentWidth: 4
3+
AccessModifierOffset: -4
4+
BreakBeforeBraces: Custom
5+
BraceWrapping:
6+
AfterFunction: true
7+
BreakConstructorInitializers: BeforeComma
8+
ConstructorInitializerIndentWidth: 2
9+
SortIncludes: false
10+
AlignConsecutiveMacros: true
11+
AllowShortIfStatementsOnASingleLine: Never
12+
ColumnLimit: 80
13+
SpaceBeforeParens: Never
14+
AlwaysBreakAfterDefinitionReturnType: TopLevel
15+
IndentCaseLabels: false

main.cpp

+16-18
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,34 @@
44
#include "saga.hpp"
55
#include "test/cli.h"
66

7-
87
std::vector<saga::CliCmd> saga::clicmds;
98

109
static int
1110
usage(void)
1211
{
13-
printf("\nUsage: saga <cmd> ...\n\n");
14-
printf("Available commands:\n\n");
15-
for(auto &c : saga::clicmds) {
16-
printf("\t%-30s %s\n", c.argpattern, c.description);
17-
}
18-
printf("\n");
19-
return 1;
12+
printf("\nUsage: saga <cmd> ...\n\n");
13+
printf("Available commands:\n\n");
14+
for(auto &c : saga::clicmds) {
15+
printf("\t%-30s %s\n", c.argpattern, c.description);
16+
}
17+
printf("\n");
18+
return 1;
2019
}
2120

22-
2321
int
2422
main(int argc, char **argv)
2523
{
26-
if(argc < 2)
27-
return usage();
24+
if(argc < 2)
25+
return usage();
2826

29-
argv += 1;
30-
argc -= 1;
27+
argv += 1;
28+
argc -= 1;
3129

32-
for(auto &c : saga::clicmds) {
33-
if(!strcmp(c.cmd, argv[0])) {
34-
return c.fn(argc, argv);
30+
for(auto &c : saga::clicmds) {
31+
if(!strcmp(c.cmd, argv[0])) {
32+
return c.fn(argc, argv);
33+
}
3534
}
36-
}
3735

38-
return usage();
36+
return usage();
3937
}

0 commit comments

Comments
 (0)