Skip to content

Commit 99e4b15

Browse files
authored
Merge pull request #62 from codereport/random
Removals & clang-format
2 parents 87182fa + 1b3ddc0 commit 99e4b15

File tree

5 files changed

+9
-60
lines changed

5 files changed

+9
-60
lines changed

.clang-format

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ BraceWrapping:
4141
SplitEmptyRecord: false
4242
SplitEmptyNamespace: false
4343
BreakBeforeBinaryOperators: None
44-
BreakBeforeBraces: WebKit
44+
BreakBeforeBraces: Attach
4545
BreakBeforeInheritanceComma: false
4646
BreakInheritanceList: BeforeColon
4747
BreakBeforeTernaryOperators: true
@@ -78,7 +78,7 @@ IncludeCategories:
7878
IncludeIsMainRegex: '([-_](test|unittest))?$'
7979
IndentCaseLabels: true
8080
IndentPPDirectives: None
81-
IndentWidth: 2
81+
IndentWidth: 4
8282
IndentWrappedFunctionNames: false
8383
JavaScriptQuotes: Leave
8484
JavaScriptWrapImports: true
@@ -151,5 +151,5 @@ StatementMacros:
151151
- Q_UNUSED
152152
- QT_REQUIRE_VERSION
153153
# Be consistent with indent-width, even for people who use tab for indentation!
154-
TabWidth: 2
154+
TabWidth: 3
155155
UseTab: Never

base64/lib/arch/generic/dec_tail.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
st.bytes++;
1212

1313
// Deliberate fallthrough:
14-
BASE64_FALLTHROUGH
1514

1615
case 1: if (slen-- == 0) {
1716
ret = 1;
@@ -28,7 +27,6 @@
2827
olen++;
2928

3029
// Deliberate fallthrough:
31-
BASE64_FALLTHROUGH
3230

3331
case 2: if (slen-- == 0) {
3432
ret = 1;
@@ -63,7 +61,6 @@
6361
olen++;
6462

6563
// Deliberate fallthrough:
66-
BASE64_FALLTHROUGH
6764

6865
case 3: if (slen-- == 0) {
6966
ret = 1;

base64/lib/arch/generic/enc_tail.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
olen += 1;
88

99
// Deliberate fallthrough:
10-
BASE64_FALLTHROUGH
1110

1211
case 1: if (slen-- == 0) {
1312
break;
@@ -18,7 +17,6 @@
1817
olen += 1;
1918

2019
// Deliberate fallthrough:
21-
BASE64_FALLTHROUGH
2220

2321
case 2: if (slen-- == 0) {
2422
break;

base64/lib/env.h

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,19 @@
55
// the compile-time environment. Compatibility and portability macros go here.
66

77
// Define machine endianness. This is for GCC:
8-
#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
9-
# define BASE64_LITTLE_ENDIAN 1
10-
#else
11-
# define BASE64_LITTLE_ENDIAN 0
12-
#endif
13-
14-
// This is for Clang:
15-
#ifdef __LITTLE_ENDIAN__
16-
# define BASE64_LITTLE_ENDIAN 1
17-
#endif
18-
19-
#ifdef __BIG_ENDIAN__
20-
# define BASE64_LITTLE_ENDIAN 0
21-
#endif
22-
23-
// MSVC++ needs intrin.h for _byteswap_uint64 (issue #68):
24-
#if BASE64_LITTLE_ENDIAN && defined(_MSC_VER)
25-
# include <intrin.h>
26-
#endif
8+
#define BASE64_LITTLE_ENDIAN 1
9+
#define BASE64_LITTLE_ENDIAN 1
2710

2811
// Endian conversion functions:
29-
#if BASE64_LITTLE_ENDIAN
30-
# ifdef _MSC_VER
31-
// Microsoft Visual C++:
32-
# define BASE64_HTOBE32(x) _byteswap_ulong(x)
33-
# define BASE64_HTOBE64(x) _byteswap_uint64(x)
34-
# else
3512
// GCC and Clang:
36-
# define BASE64_HTOBE32(x) __builtin_bswap32(x)
37-
# define BASE64_HTOBE64(x) __builtin_bswap64(x)
38-
# endif
39-
#else
40-
// No conversion needed:
41-
# define BASE64_HTOBE32(x) (x)
42-
# define BASE64_HTOBE64(x) (x)
43-
#endif
13+
#define BASE64_HTOBE32(x) __builtin_bswap32(x)
14+
#define BASE64_HTOBE64(x) __builtin_bswap64(x)
4415

4516
// Detect word size:
4617
#ifdef _INTEGRAL_MAX_BITS
47-
# define BASE64_WORDSIZE _INTEGRAL_MAX_BITS
18+
#define BASE64_WORDSIZE _INTEGRAL_MAX_BITS
4819
#else
49-
# define BASE64_WORDSIZE __WORDSIZE
20+
#define BASE64_WORDSIZE __WORDSIZE
5021
#endif
5122

5223
// End-of-file definitions.
@@ -55,13 +26,4 @@
5526
// End-of-file when stream end has been reached or invalid input provided:
5627
#define BASE64_EOF 2
5728

58-
// GCC 7 defaults to issuing a warning for fallthrough in switch statements,
59-
// unless the fallthrough cases are marked with an attribute. As we use
60-
// fallthrough deliberately, define an alias for the attribute:
61-
#if __GNUC__ >= 7
62-
# define BASE64_FALLTHROUGH __attribute__((fallthrough));
63-
#else
64-
# define BASE64_FALLTHROUGH
65-
#endif
66-
6729
#endif // BASE64_ENV_H

jsrc/tags.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)