Skip to content

Commit c3c8c8f

Browse files
add clang-format config
1 parent 0024491 commit c3c8c8f

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

.clang-format

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
AccessModifierOffset: -4
3+
BasedOnStyle: LLVM
4+
BreakBeforeBraces: Attach
5+
IndentWidth: 4
6+
TabWidth: 4
7+
AllowShortIfStatementsOnASingleLine: false
8+
IncludeBlocks: Regroup
9+
IncludeCategories:
10+
- Regex: '^<tesla.hpp>'
11+
Priority: 2
12+
- Regex: '^<.*\.h>'
13+
Priority: 1
14+
- Regex: '^<.*'
15+
Priority: 2
16+
- Regex: '.*'
17+
Priority: 3
18+
ColumnLimit: 0
19+
IndentCaseLabels: 'true'
20+
PointerAlignment: Right
21+
SortIncludes: 'true'
22+
Standard: Cpp11
23+
UseTab: Always
24+
25+
...

source/gui_main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818
#include "gui_main.hpp"
19-
#include "gui_error.hpp"
20-
#include "upload.hpp"
19+
20+
#include <string>
2121

2222
#include "elm_button.hpp"
2323
#include "elm_text.hpp"
24-
25-
#include <string>
24+
#include "gui_error.hpp"
25+
#include "upload.hpp"
2626

2727
constexpr size_t THUMB_WIDTH = 320, THUMB_HEIGHT = 180;
2828
constexpr size_t JPG_SIZE = 1024 * 1024;

source/upload.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
*/
1818
#pragma once
1919

20-
#include <string>
2120
#include <switch.h>
2221

22+
#include <string>
23+
2324
namespace web {
2425

2526
std::string UploadImage(const CapsAlbumFileId &fileId);

0 commit comments

Comments
 (0)