Skip to content

Commit 4d62c06

Browse files
committed
Fix CI
Of course, it's always the multi-billion corporation MSVC compiler, while GCC and Clang are working like a charm.
1 parent 9484bb2 commit 4d62c06

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

src/Core/Constants.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Enigma::Constants {
1919
// https://i.stack.imgur.com/0hNsK.jpg
2020

2121
static constexpr std::size_t MINIMUM_PASSWORD_LENGTH = 6; // AT LEAST 6 CHARACTERS, FOR SECURITY REASONS.
22-
static constexpr char *SPECIAL_CHARACTERS = R"(!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~)";
22+
static constexpr char SPECIAL_CHARACTERS[] = R"(!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~)";
2323

2424
namespace AES {
2525
//https://www.cryptopp.com/wiki/GCM_Mode
@@ -88,7 +88,7 @@ namespace Enigma::Constants {
8888
#endif
8989

9090
namespace CLI {
91-
static constexpr char *CLI_HELP_MESSAGE = "Say -h or --help to display available options";
91+
static constexpr char CLI_HELP_MESSAGE[] = "Say -h or --help to display available options";
9292
}
9393

9494
namespace Links {

src/Meta/Endianness.hpp

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
namespace Enigma {
1717

18-
constexpr std::uint64_t BSwap64(std::uint64_t host_int) {
18+
inline std::uint64_t BSwap64(std::uint64_t host_int) {
1919
#if defined(__GNUC__) || ENIGMA_HAVE_BUILTIN(__builtin_bswap64)
2020
return __builtin_bswap64(host_int);
2121
#elif defined(_MSC_VER)
@@ -32,7 +32,7 @@ namespace Enigma {
3232
#endif
3333
}
3434

35-
constexpr std::uint32_t BSwap32(std::uint32_t host_int) {
35+
inline std::uint32_t BSwap32(std::uint32_t host_int) {
3636
#if defined(__GNUC__) || ENIGMA_HAVE_BUILTIN(__builtin_bswap32)
3737
return __builtin_bswap32(host_int);
3838
#elif defined(_MSC_VER)
@@ -45,7 +45,7 @@ namespace Enigma {
4545
#endif
4646
}
4747

48-
constexpr std::uint16_t BSwap16(std::uint16_t host_int) {
48+
inline std::uint16_t BSwap16(std::uint16_t host_int) {
4949
#if defined(__GNUC__) || ENIGMA_HAVE_BUILTIN(__builtin_bswap16)
5050
return __builtin_bswap16(host_int);
5151
#elif defined(_MSC_VER)
@@ -58,48 +58,48 @@ namespace Enigma {
5858

5959
namespace LittleEndian {
6060

61-
constexpr std::uint16_t fromHost(std::uint16_t value) {
62-
if constexpr (std::endian::native == std::endian::big) {
61+
inline std::uint16_t fromHost(std::uint16_t value) {
62+
if (std::endian::native == std::endian::big) {
6363
return BSwap16(value);
6464
} else {
6565
return value;
6666
}
6767
}
6868

69-
constexpr std::uint32_t fromHost(std::uint32_t value) {
70-
if constexpr (std::endian::native == std::endian::big) {
69+
inline std::uint32_t fromHost(std::uint32_t value) {
70+
if (std::endian::native == std::endian::big) {
7171
return BSwap32(value);
7272
} else {
7373
return value;
7474
}
7575
}
7676

77-
constexpr std::uint64_t fromHost(std::uint64_t value) {
78-
if constexpr (std::endian::native == std::endian::big) {
77+
inline std::uint64_t fromHost(std::uint64_t value) {
78+
if (std::endian::native == std::endian::big) {
7979
return BSwap64(value);
8080
} else {
8181
return value;
8282
}
8383
}
8484

85-
constexpr std::uint16_t toHost(std::uint16_t value) {
86-
if constexpr (std::endian::native == std::endian::big) {
85+
inline std::uint16_t toHost(std::uint16_t value) {
86+
if (std::endian::native == std::endian::big) {
8787
return BSwap16(value);
8888
} else {
8989
return value;
9090
}
9191
}
9292

93-
constexpr std::uint32_t toHost(std::uint32_t value) {
94-
if constexpr (std::endian::native == std::endian::big) {
93+
inline std::uint32_t toHost(std::uint32_t value) {
94+
if (std::endian::native == std::endian::big) {
9595
return BSwap32(value);
9696
} else {
9797
return value;
9898
}
9999
}
100100

101-
constexpr std::uint64_t toHost(std::uint64_t value) {
102-
if constexpr (std::endian::native == std::endian::big) {
101+
inline std::uint64_t toHost(std::uint64_t value) {
102+
if (std::endian::native == std::endian::big) {
103103
return BSwap64(value);
104104
} else {
105105
return value;
@@ -110,48 +110,48 @@ namespace Enigma {
110110

111111
//[[maybe_unused]]
112112
namespace BigEndian {
113-
constexpr std::uint16_t fromHost(std::uint16_t value) {
114-
if constexpr (std::endian::native == std::endian::big) {
113+
inline std::uint16_t fromHost(std::uint16_t value) {
114+
if (std::endian::native == std::endian::big) {
115115
return value;
116116
} else {
117117
return BSwap16(value);
118118
}
119119
}
120120

121-
constexpr std::uint32_t fromHost(std::uint32_t value) {
122-
if constexpr (std::endian::native == std::endian::big) {
121+
inline std::uint32_t fromHost(std::uint32_t value) {
122+
if (std::endian::native == std::endian::big) {
123123
return value;
124124
} else {
125125
return BSwap32(value);
126126
}
127127
}
128128

129-
constexpr std::uint64_t fromHost(std::uint64_t value) {
130-
if constexpr (std::endian::native == std::endian::big) {
129+
inline std::uint64_t fromHost(std::uint64_t value) {
130+
if (std::endian::native == std::endian::big) {
131131
return value;
132132
} else {
133133
return BSwap64(value);
134134
}
135135
}
136136

137-
constexpr std::uint16_t toHost(std::uint16_t value) {
138-
if constexpr (std::endian::native == std::endian::big) {
137+
inline std::uint16_t toHost(std::uint16_t value) {
138+
if (std::endian::native == std::endian::big) {
139139
return value;
140140
} else {
141141
return BSwap16(value);
142142
}
143143
}
144144

145-
constexpr std::uint32_t toHost(std::uint32_t value) {
146-
if constexpr (std::endian::native == std::endian::big) {
145+
inline std::uint32_t toHost(std::uint32_t value) {
146+
if (std::endian::native == std::endian::big) {
147147
return value;
148148
} else {
149149
return BSwap32(value);
150150
}
151151
}
152152

153-
constexpr std::uint64_t toHost(std::uint64_t value) {
154-
if constexpr (std::endian::native == std::endian::big) {
153+
inline std::uint64_t toHost(std::uint64_t value) {
154+
if (std::endian::native == std::endian::big) {
155155
return value;
156156
} else {
157157
return BSwap64(value);

0 commit comments

Comments
 (0)