Skip to content

Commit 4e26106

Browse files
committed
clang-format: set IndentPPDirectives to AfterHash
1 parent 1d24caf commit 4e26106

23 files changed

+251
-249
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ BasedOnStyle: Google
44
Standard: Cpp03
55
AllowShortFunctionsOnASingleLine: Empty
66
IncludeBlocks: Preserve
7+
IndentPPDirectives: AfterHash
78

89
# Always break after if to get accurate coverage
910
AllowShortIfStatementsOnASingleLine: false

extras/tests/FailingBuilds/read_long_long.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#include <ArduinoJson.h>
77

88
#if defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ >= 8
9-
#error This test requires sizeof(long) < 8
9+
# error This test requires sizeof(long) < 8
1010
#endif
1111

1212
#if !ARDUINOJSON_HAS_LONG_LONG
13-
#error This test requires C++11
13+
# error This test requires C++11
1414
#endif
1515

1616
ARDUINOJSON_ASSERT_INTEGER_TYPE_IS_SUPPORTED(long long)

extras/tests/FailingBuilds/write_long_long.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#include <ArduinoJson.h>
77

88
#if defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ >= 8
9-
#error This test requires sizeof(long) < 8
9+
# error This test requires sizeof(long) < 8
1010
#endif
1111

1212
#if !ARDUINOJSON_HAS_LONG_LONG
13-
#error This test requires C++11
13+
# error This test requires C++11
1414
#endif
1515

1616
int main() {

extras/tests/Misc/unsigned_char.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <catch.hpp>
77

88
#if defined(__clang__)
9-
#define CONFLICTS_WITH_BUILTIN_OPERATOR
9+
# define CONFLICTS_WITH_BUILTIN_OPERATOR
1010
#endif
1111

1212
TEST_CASE("unsigned char[]") {

src/ArduinoJson.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
#include "ArduinoJson/Configuration.hpp"
88

99
#if !ARDUINOJSON_DEBUG
10-
#ifdef __clang__
11-
#pragma clang system_header
12-
#elif defined __GNUC__
13-
#pragma GCC system_header
14-
#endif
10+
# ifdef __clang__
11+
# pragma clang system_header
12+
# elif defined __GNUC__
13+
# pragma GCC system_header
14+
# endif
1515
#endif
1616

1717
#include "ArduinoJson/Array/ArrayRef.hpp"

src/ArduinoJson/Array/ElementProxy.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#include <ArduinoJson/Variant/VariantTo.hpp>
1111

1212
#ifdef _MSC_VER
13-
#pragma warning(push)
14-
#pragma warning(disable : 4522)
13+
# pragma warning(push)
14+
# pragma warning(disable : 4522)
1515
#endif
1616

1717
namespace ARDUINOJSON_NAMESPACE {
@@ -189,5 +189,5 @@ class ElementProxy : public VariantOperators<ElementProxy<TArray> >,
189189
} // namespace ARDUINOJSON_NAMESPACE
190190

191191
#ifdef _MSC_VER
192-
#pragma warning(pop)
192+
# pragma warning(pop)
193193
#endif

0 commit comments

Comments
 (0)