@@ -126,9 +126,7 @@ template<typename CharType> struct data_variant
126
126
// cppcheck-suppress noExplicitConstructor
127
127
constexpr data_variant (std::basic_string_view<CharType> s) : value{ s }, selected{ selected_type::string } {}
128
128
129
- [[nodiscard]] constexpr bool is_boolean () const noexcept {
130
- return selected == selected_type::boolean;
131
- }
129
+ [[nodiscard]] constexpr bool is_boolean () const noexcept { return selected == selected_type::boolean; }
132
130
133
131
[[nodiscard]] constexpr const bool *get_if_boolean () const noexcept
134
132
{
@@ -139,9 +137,7 @@ template<typename CharType> struct data_variant
139
137
}
140
138
}
141
139
142
- [[nodiscard]] constexpr bool is_array () const noexcept {
143
- return selected == selected_type::array;
144
- }
140
+ [[nodiscard]] constexpr bool is_array () const noexcept { return selected == selected_type::array; }
145
141
146
142
[[nodiscard]] constexpr const basic_array_t <CharType> *get_if_array () const noexcept
147
143
{
@@ -152,9 +148,7 @@ template<typename CharType> struct data_variant
152
148
}
153
149
}
154
150
155
- [[nodiscard]] constexpr bool is_object () const noexcept {
156
- return selected == selected_type::object;
157
- }
151
+ [[nodiscard]] constexpr bool is_object () const noexcept { return selected == selected_type::object; }
158
152
159
153
[[nodiscard]] constexpr const basic_object_t <CharType> *get_if_object () const noexcept
160
154
{
@@ -165,9 +159,7 @@ template<typename CharType> struct data_variant
165
159
}
166
160
}
167
161
168
- [[nodiscard]] constexpr bool is_integer () const noexcept {
169
- return selected == selected_type::integer;
170
- }
162
+ [[nodiscard]] constexpr bool is_integer () const noexcept { return selected == selected_type::integer; }
171
163
172
164
[[nodiscard]] constexpr const std::int64_t *get_if_integer () const noexcept
173
165
{
@@ -178,9 +170,7 @@ template<typename CharType> struct data_variant
178
170
}
179
171
}
180
172
181
- [[nodiscard]] constexpr bool is_uinteger () const noexcept {
182
- return selected == selected_type::uinteger;
183
- }
173
+ [[nodiscard]] constexpr bool is_uinteger () const noexcept { return selected == selected_type::uinteger; }
184
174
185
175
[[nodiscard]] constexpr const std::uint64_t *get_if_uinteger () const noexcept
186
176
{
@@ -192,9 +182,7 @@ template<typename CharType> struct data_variant
192
182
}
193
183
194
184
195
- [[nodiscard]] constexpr bool is_floating_point () const noexcept {
196
- return selected == selected_type::floating_point;
197
- }
185
+ [[nodiscard]] constexpr bool is_floating_point () const noexcept { return selected == selected_type::floating_point; }
198
186
199
187
200
188
[[nodiscard]] constexpr const double *get_if_floating_point () const noexcept
@@ -206,9 +194,7 @@ template<typename CharType> struct data_variant
206
194
}
207
195
}
208
196
209
- [[nodiscard]] constexpr bool is_string () const noexcept {
210
- return selected == selected_type::string;
211
- }
197
+ [[nodiscard]] constexpr bool is_string () const noexcept { return selected == selected_type::string; }
212
198
213
199
[[nodiscard]] constexpr const std::basic_string_view<CharType> *get_if_string () const noexcept
214
200
{
0 commit comments