Skip to content

Commit 45ef7c7

Browse files
committed
Formatted files
1 parent 69d173c commit 45ef7c7

File tree

2 files changed

+47
-46
lines changed

2 files changed

+47
-46
lines changed

include/Platform.hpp

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
/*************************************************************************
2-
* Platform macros
3-
* A C++ header that defines macros depending on the compilation
4-
* environment and targets.
5-
*------------------------------------------------------------------------
6-
* Copyright (c) 2017-2020, Daniel Almeida
7-
* All rights reserved.
8-
*
9-
* Redistribution and use in source and binary forms, with or without
10-
* modification, are permitted provided that the following conditions
11-
* are met:
12-
*
13-
* 1. Redistributions of source code must retain the above copyright
14-
* notice, this list of conditions and the following disclaimer.
15-
*
16-
* 2. Redistributions in binary form must reproduce the above copyright
17-
* notice, this list of conditions and the following disclaimer in the
18-
* documentation and/or other materials provided with the distribution.
19-
*
20-
* 3. Neither the name of the copyright holder nor the names of its
21-
* contributors may be used to endorse or promote products derived from
22-
* this software without specific prior written permission.
23-
*
24-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28-
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35-
*************************************************************************/
2+
* Platform macros
3+
* A C++ header that defines macros depending on the compilation
4+
* environment and targets.
5+
*------------------------------------------------------------------------
6+
* Copyright (c) 2017-2020, Daniel Almeida
7+
* All rights reserved.
8+
*
9+
* Redistribution and use in source and binary forms, with or without
10+
* modification, are permitted provided that the following conditions
11+
* are met:
12+
*
13+
* 1. Redistributions of source code must retain the above copyright
14+
* notice, this list of conditions and the following disclaimer.
15+
*
16+
* 2. Redistributions in binary form must reproduce the above copyright
17+
* notice, this list of conditions and the following disclaimer in the
18+
* documentation and/or other materials provided with the distribution.
19+
*
20+
* 3. Neither the name of the copyright holder nor the names of its
21+
* contributors may be used to endorse or promote products derived from
22+
* this software without specific prior written permission.
23+
*
24+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28+
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35+
*************************************************************************/
3636

3737
#pragma once
3838

@@ -68,19 +68,17 @@
6868

6969
#ifdef COMPILER_VC
7070

71-
#define DEPRECATED \
72-
__declspec( deprecated( "deprecated, avoid using this" ) )
71+
#define DEPRECATED __declspec(deprecated("deprecated, avoid using this"))
7372

74-
#define DEPRECATED_WITH_SUBSTITUTE( substitute ) \
75-
__declspec( deprecated( "deprecated, use " #substitute " instead" ) )
73+
#define DEPRECATED_WITH_SUBSTITUTE(substitute) \
74+
__declspec(deprecated("deprecated, use " #substitute " instead"))
7675

7776
#else
7877

79-
#define DEPRECATED \
80-
__attribute__( ( deprecated( "avoid using this" ) ) )
78+
#define DEPRECATED __attribute__((deprecated("avoid using this")))
8179

82-
#define DEPRECATED_WITH_SUBSTITUTE( substitute ) \
83-
__attribute__( ( deprecated( "use " #substitute " instead" ) ) )
80+
#define DEPRECATED_WITH_SUBSTITUTE(substitute) \
81+
__attribute__((deprecated("use " #substitute " instead")))
8482

8583
#endif
8684

@@ -133,15 +131,18 @@
133131

134132
#endif
135133

136-
#if defined _M_IX86 || defined ___i386__ || defined __i386 || defined __X86__ || defined _X86_ || defined __I86__
134+
#if defined _M_IX86 || defined ___i386__ || defined __i386 || \
135+
defined __X86__ || defined _X86_ || defined __I86__
137136

138137
#define ARCHITECTURE_X86 1
139-
#define ARCHITECTURE_X86_OLD 1 // Should disappear when the x86-64 Garry's Mod branch is merged
138+
#define ARCHITECTURE_X86_OLD \
139+
1 // Should disappear when the x86-64 Garry's Mod branch is merged
140140

141141
#define ARCHITECTURE_IS_X86 1
142142
#define ARCHITECTURE_IS_X86_64 0
143143

144-
#elif defined _M_X64 || defined __amd64__ || defined __amd64 || defined __x86_64__ || defined __x86_64
144+
#elif defined _M_X64 || defined __amd64__ || defined __amd64 || \
145+
defined __x86_64__ || defined __x86_64
145146

146147
#define ARCHITECTURE_X86_64 1
147148

source/ABICompatibility.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <Platform.hpp>
22

33
// Visual Studio 2015 to Visual Studio 2022
4-
#if defined SYSTEM_WINDOWS && ( _MSC_VER < 1900 || _MSC_VER > 1936 )
4+
#if defined SYSTEM_WINDOWS && (_MSC_VER < 1900 || _MSC_VER > 1936)
55

66
#error The only supported compilation platforms for this project on Windows are Visual Studio 2015, 2017, 2019 and 2022 (for ABI compatibility reasons).
77

0 commit comments

Comments
 (0)