Skip to content

Commit 8c1623a

Browse files
authored
Merge pull request #262 from wravery/inline-cleanup
Cleanup redundant inline specifiers
2 parents 4007fd5 + 42849fc commit 8c1623a

File tree

78 files changed

+601
-606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+601
-606
lines changed

include/graphqlservice/GraphQLClient.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ struct ModifiedVariable
146146

147147
// Peel off the none modifier. If it's included, it should always be last in the list.
148148
template <TypeModifier Modifier = TypeModifier::None, TypeModifier... Other>
149-
[[nodiscard]] static inline response::Value serialize(
149+
[[nodiscard]] static response::Value serialize(
150150
Type&& value) requires OnlyNoneModifiers<Modifier, Other...>
151151
{
152152
// Just call through to the non-template method without the modifiers.
@@ -155,7 +155,7 @@ struct ModifiedVariable
155155

156156
// Peel off nullable modifiers.
157157
template <TypeModifier Modifier, TypeModifier... Other>
158-
[[nodiscard]] static inline response::Value serialize(
158+
[[nodiscard]] static response::Value serialize(
159159
typename VariableTraits<Type, Modifier, Other...>::type&& nullableValue) requires
160160
NullableModifier<Modifier>
161161
{
@@ -172,7 +172,7 @@ struct ModifiedVariable
172172

173173
// Peel off list modifiers.
174174
template <TypeModifier Modifier, TypeModifier... Other>
175-
[[nodiscard]] static inline response::Value serialize(
175+
[[nodiscard]] static response::Value serialize(
176176
typename VariableTraits<Type, Modifier, Other...>::type&& listValue) requires
177177
ListModifier<Modifier>
178178
{
@@ -189,7 +189,7 @@ struct ModifiedVariable
189189

190190
// Peel off the none modifier. If it's included, it should always be last in the list.
191191
template <TypeModifier Modifier = TypeModifier::None, TypeModifier... Other>
192-
[[nodiscard]] static inline Type duplicate(
192+
[[nodiscard]] static Type duplicate(
193193
const Type& value) requires OnlyNoneModifiers<Modifier, Other...>
194194
{
195195
// Just copy the value.
@@ -198,7 +198,7 @@ struct ModifiedVariable
198198

199199
// Peel off nullable modifiers.
200200
template <TypeModifier Modifier, TypeModifier... Other>
201-
[[nodiscard]] static inline typename VariableTraits<Type, Modifier, Other...>::type duplicate(
201+
[[nodiscard]] static typename VariableTraits<Type, Modifier, Other...>::type duplicate(
202202
const typename VariableTraits<Type, Modifier, Other...>::type& nullableValue) requires
203203
NullableModifier<Modifier>
204204
{
@@ -222,7 +222,7 @@ struct ModifiedVariable
222222

223223
// Peel off list modifiers.
224224
template <TypeModifier Modifier, TypeModifier... Other>
225-
[[nodiscard]] static inline typename VariableTraits<Type, Modifier, Other...>::type duplicate(
225+
[[nodiscard]] static typename VariableTraits<Type, Modifier, Other...>::type duplicate(
226226
const typename VariableTraits<Type, Modifier, Other...>::type& listValue) requires
227227
ListModifier<Modifier>
228228
{
@@ -296,15 +296,15 @@ struct ModifiedResponse
296296

297297
// Peel off the none modifier. If it's included, it should always be last in the list.
298298
template <TypeModifier Modifier = TypeModifier::None, TypeModifier... Other>
299-
[[nodiscard]] static inline Type parse(
299+
[[nodiscard]] static Type parse(
300300
response::Value&& response) requires OnlyNoneModifiers<Modifier, Other...>
301301
{
302302
return Response<Type>::parse(std::move(response));
303303
}
304304

305305
// Peel off nullable modifiers.
306306
template <TypeModifier Modifier, TypeModifier... Other>
307-
[[nodiscard]] static inline std::optional<typename ResponseTraits<Type, Other...>::type> parse(
307+
[[nodiscard]] static std::optional<typename ResponseTraits<Type, Other...>::type> parse(
308308
response::Value&& response) requires NullableModifier<Modifier>
309309
{
310310
if (response.type() == response::Type::Null)
@@ -318,7 +318,7 @@ struct ModifiedResponse
318318

319319
// Peel off list modifiers.
320320
template <TypeModifier Modifier, TypeModifier... Other>
321-
[[nodiscard]] static inline std::vector<typename ResponseTraits<Type, Other...>::type> parse(
321+
[[nodiscard]] static std::vector<typename ResponseTraits<Type, Other...>::type> parse(
322322
response::Value&& response) requires ListModifier<Modifier>
323323
{
324324
std::vector<typename ResponseTraits<Type, Other...>::type> result;

include/graphqlservice/GraphQLResponse.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -392,42 +392,42 @@ class [[nodiscard]] Writer final
392392
template <class T>
393393
struct Model : Concept
394394
{
395-
inline Model(std::unique_ptr<T>&& pimpl)
395+
Model(std::unique_ptr<T>&& pimpl)
396396
: _pimpl { std::move(pimpl) }
397397
{
398398
}
399399

400-
inline void start_object() const final
400+
void start_object() const final
401401
{
402402
_pimpl->start_object();
403403
}
404404

405-
inline void add_member(const std::string& key) const final
405+
void add_member(const std::string& key) const final
406406
{
407407
_pimpl->add_member(key);
408408
}
409409

410-
inline void end_object() const final
410+
void end_object() const final
411411
{
412412
_pimpl->end_object();
413413
}
414414

415-
inline void start_array() const final
415+
void start_array() const final
416416
{
417417
_pimpl->start_array();
418418
}
419419

420-
inline void end_arrary() const final
420+
void end_arrary() const final
421421
{
422422
_pimpl->end_arrary();
423423
}
424424

425-
inline void write_null() const final
425+
void write_null() const final
426426
{
427427
_pimpl->write_null();
428428
}
429429

430-
inline void write_string(const std::string& value) const final
430+
void write_string(const std::string& value) const final
431431
{
432432
_pimpl->write_string(value);
433433
}
@@ -437,12 +437,12 @@ class [[nodiscard]] Writer final
437437
_pimpl->write_bool(value);
438438
}
439439

440-
inline void write_int(int value) const final
440+
void write_int(int value) const final
441441
{
442442
_pimpl->write_int(value);
443443
}
444444

445-
inline void write_float(double value) const final
445+
void write_float(double value) const final
446446
{
447447
_pimpl->write_float(value);
448448
}
@@ -455,7 +455,7 @@ class [[nodiscard]] Writer final
455455

456456
public:
457457
template <class T>
458-
inline Writer(std::unique_ptr<T> writer)
458+
Writer(std::unique_ptr<T> writer)
459459
: _concept { std::static_pointer_cast<const Concept>(
460460
std::make_shared<Model<T>>(std::move(writer))) }
461461
{

0 commit comments

Comments
 (0)