summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2016-09-21 00:13:46 -0700
committerGravatar Yuri Kunde Schlesner2016-09-21 00:16:33 -0700
commitf120e78b5692e1c710f2335d36fd0593c447a613 (patch)
tree7662a45ec3da3e99f3fcd47cd502d0cd5192e49b /src
parentUse negative priorities to avoid special-casing the self-include (diff)
downloadyuzu-f120e78b5692e1c710f2335d36fd0593c447a613.tar.gz
yuzu-f120e78b5692e1c710f2335d36fd0593c447a613.tar.xz
yuzu-f120e78b5692e1c710f2335d36fd0593c447a613.zip
Remove special rules for Windows.h and library includes
Diffstat (limited to 'src')
-rw-r--r--src/.clang-format10
-rw-r--r--src/common/file_util.cpp1
-rw-r--r--src/common/memory_util.cpp1
-rw-r--r--src/common/string_util.cpp2
-rw-r--r--src/core/gdbstub/gdbstub.cpp2
-rw-r--r--src/video_core/shader/shader_jit_x64.cpp2
6 files changed, 8 insertions, 10 deletions
diff --git a/src/.clang-format b/src/.clang-format
index e4f5d6d7e..1c6b71b2e 100644
--- a/src/.clang-format
+++ b/src/.clang-format
@@ -46,14 +46,10 @@ DerivePointerAlignment: false
46DisableFormat: false 46DisableFormat: false
47ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] 47ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
48IncludeCategories: 48IncludeCategories:
49 - Regex: '^\<[wW]indows.h\>' 49 - Regex: '^\<[^Q][^/.>]*\>'
50 Priority: -3
51 - Regex: '^\<(boost|catch|dynarmic|glad|inih|nihstro)/'
52 Priority: -1
53 - Regex: '^\<(SDL|SoundTouch|Q)'
54 Priority: -1
55 - Regex: '^\<'
56 Priority: -2 50 Priority: -2
51 - Regex: '^\<'
52 Priority: -1
57 - Regex: '^\"' 53 - Regex: '^\"'
58 Priority: 0 54 Priority: 0
59IndentCaseLabels: false 55IndentCaseLabels: false
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 7a21962cc..14cbcac6b 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -10,6 +10,7 @@
10 10
11#ifdef _WIN32 11#ifdef _WIN32
12#include <windows.h> 12#include <windows.h>
13// windows.h needs to be included before other windows headers
13#include <commdlg.h> // for GetSaveFileName 14#include <commdlg.h> // for GetSaveFileName
14#include <direct.h> // getcwd 15#include <direct.h> // getcwd
15#include <io.h> 16#include <io.h>
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp
index e19d7202a..c19729b21 100644
--- a/src/common/memory_util.cpp
+++ b/src/common/memory_util.cpp
@@ -7,6 +7,7 @@
7 7
8#ifdef _WIN32 8#ifdef _WIN32
9#include <windows.h> 9#include <windows.h>
10// Windows.h needs to be included before psapi.h
10#include <psapi.h> 11#include <psapi.h>
11#include "common/common_funcs.h" 12#include "common/common_funcs.h"
12#include "common/string_util.h" 13#include "common/string_util.h"
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp
index ca97e8ab4..596ae01bf 100644
--- a/src/common/string_util.cpp
+++ b/src/common/string_util.cpp
@@ -12,8 +12,8 @@
12#include "common/logging/log.h" 12#include "common/logging/log.h"
13#include "common/string_util.h" 13#include "common/string_util.h"
14#ifdef _MSC_VER 14#ifdef _MSC_VER
15#include <Windows.h>
16#include <codecvt> 15#include <codecvt>
16#include <Windows.h>
17#include "common/common_funcs.h" 17#include "common/common_funcs.h"
18#else 18#else
19#include <iconv.h> 19#include <iconv.h>
diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp
index 6d709bd15..7fc72d801 100644
--- a/src/core/gdbstub/gdbstub.cpp
+++ b/src/core/gdbstub/gdbstub.cpp
@@ -10,9 +10,9 @@
10#include <cstdarg> 10#include <cstdarg>
11#include <cstdio> 11#include <cstdio>
12#include <cstring> 12#include <cstring>
13#include <fcntl.h>
14#include <map> 13#include <map>
15#include <numeric> 14#include <numeric>
15#include <fcntl.h>
16 16
17#ifdef _MSC_VER 17#ifdef _MSC_VER
18#include <WinSock2.h> 18#include <WinSock2.h>
diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp
index 4d788755b..211c703ab 100644
--- a/src/video_core/shader/shader_jit_x64.cpp
+++ b/src/video_core/shader/shader_jit_x64.cpp
@@ -5,8 +5,8 @@
5#include <algorithm> 5#include <algorithm>
6#include <cmath> 6#include <cmath>
7#include <cstdint> 7#include <cstdint>
8#include <xmmintrin.h>
9#include <nihstro/shader_bytecode.h> 8#include <nihstro/shader_bytecode.h>
9#include <xmmintrin.h>
10#include "common/assert.h" 10#include "common/assert.h"
11#include "common/logging/log.h" 11#include "common/logging/log.h"
12#include "common/vector_math.h" 12#include "common/vector_math.h"