Skip to content

Commit e43fea6

Browse files
committed
Add inline specifiers for GCC LTO warnings/errors
1 parent 8d2afea commit e43fea6

File tree

80 files changed

+658
-653
lines changed

Some content is hidden

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

80 files changed

+658
-653
lines changed

include/graphqlservice/GraphQLClient.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ concept OnlyNoneModifiers = (... && (Other == TypeModifier::None));
8787
template <typename Type, TypeModifier... Other>
8888
concept InputVariableUniquePtr = InputVariableClass<Type> && OnlyNoneModifiers<Other...>;
8989

90-
9190
// Serialize variable input values with chained type modifiers which add nullable or list wrappers.
9291
template <typename Type>
9392
struct ModifiedVariable
@@ -115,7 +114,7 @@ struct ModifiedVariable
115114

116115
// Peel off the none modifier. If it's included, it should always be last in the list.
117116
template <TypeModifier Modifier = TypeModifier::None, TypeModifier... Other>
118-
[[nodiscard]] static
117+
[[nodiscard]] static inline
119118
typename std::enable_if_t<TypeModifier::None == Modifier && sizeof...(Other) == 0,
120119
response::Value>
121120
serialize(Type&& value)
@@ -126,7 +125,7 @@ struct ModifiedVariable
126125

127126
// Peel off nullable modifiers.
128127
template <TypeModifier Modifier, TypeModifier... Other>
129-
[[nodiscard]] static
128+
[[nodiscard]] static inline
130129
typename std::enable_if_t<TypeModifier::Nullable == Modifier, response::Value>
131130
serialize(typename VariableTraits<Type, Modifier, Other...>::type&& nullableValue)
132131
{
@@ -143,8 +142,9 @@ struct ModifiedVariable
143142

144143
// Peel off list modifiers.
145144
template <TypeModifier Modifier, TypeModifier... Other>
146-
[[nodiscard]] static typename std::enable_if_t<TypeModifier::List == Modifier, response::Value>
147-
serialize(typename VariableTraits<Type, Modifier, Other...>::type&& listValue)
145+
[[nodiscard]] static inline
146+
typename std::enable_if_t<TypeModifier::List == Modifier, response::Value>
147+
serialize(typename VariableTraits<Type, Modifier, Other...>::type&& listValue)
148148
{
149149
response::Value result { response::Type::List };
150150

@@ -159,7 +159,7 @@ struct ModifiedVariable
159159

160160
// Peel off the none modifier. If it's included, it should always be last in the list.
161161
template <TypeModifier Modifier = TypeModifier::None, TypeModifier... Other>
162-
[[nodiscard]] static
162+
[[nodiscard]] static inline
163163
typename std::enable_if_t<TypeModifier::None == Modifier && sizeof...(Other) == 0, Type>
164164
duplicate(const Type& value)
165165
{
@@ -169,7 +169,7 @@ struct ModifiedVariable
169169

170170
// Peel off nullable modifiers.
171171
template <TypeModifier Modifier, TypeModifier... Other>
172-
[[nodiscard]] static typename std::enable_if_t<TypeModifier::Nullable == Modifier,
172+
[[nodiscard]] static inline typename std::enable_if_t<TypeModifier::Nullable == Modifier,
173173
typename VariableTraits<Type, Modifier, Other...>::type>
174174
duplicate(const typename VariableTraits<Type, Modifier, Other...>::type& nullableValue)
175175
{
@@ -193,7 +193,7 @@ struct ModifiedVariable
193193

194194
// Peel off list modifiers.
195195
template <TypeModifier Modifier, TypeModifier... Other>
196-
[[nodiscard]] static typename std::enable_if_t<TypeModifier::List == Modifier,
196+
[[nodiscard]] static inline typename std::enable_if_t<TypeModifier::List == Modifier,
197197
typename VariableTraits<Type, Modifier, Other...>::type>
198198
duplicate(const typename VariableTraits<Type, Modifier, Other...>::type& listValue)
199199
{
@@ -259,7 +259,7 @@ struct ModifiedResponse
259259

260260
// Peel off the none modifier. If it's included, it should always be last in the list.
261261
template <TypeModifier Modifier = TypeModifier::None, TypeModifier... Other>
262-
[[nodiscard]] static
262+
[[nodiscard]] static inline
263263
typename std::enable_if_t<TypeModifier::None == Modifier && sizeof...(Other) == 0, Type>
264264
parse(response::Value&& response)
265265
{
@@ -268,7 +268,7 @@ struct ModifiedResponse
268268

269269
// Peel off nullable modifiers.
270270
template <TypeModifier Modifier, TypeModifier... Other>
271-
[[nodiscard]] static typename std::enable_if_t<TypeModifier::Nullable == Modifier,
271+
[[nodiscard]] static inline typename std::enable_if_t<TypeModifier::Nullable == Modifier,
272272
std::optional<typename ResponseTraits<Type, Other...>::type>>
273273
parse(response::Value&& response)
274274
{
@@ -283,7 +283,7 @@ struct ModifiedResponse
283283

284284
// Peel off list modifiers.
285285
template <TypeModifier Modifier, TypeModifier... Other>
286-
[[nodiscard]] static typename std::enable_if_t<TypeModifier::List == Modifier,
286+
[[nodiscard]] static inline typename std::enable_if_t<TypeModifier::List == Modifier,
287287
std::vector<typename ResponseTraits<Type, Other...>::type>>
288288
parse(response::Value&& response)
289289
{

include/graphqlservice/GraphQLResponse.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -396,42 +396,42 @@ class [[nodiscard]] Writer final
396396
template <class T>
397397
struct Model : Concept
398398
{
399-
Model(std::unique_ptr<T>&& pimpl)
399+
inline Model(std::unique_ptr<T>&& pimpl)
400400
: _pimpl { std::move(pimpl) }
401401
{
402402
}
403403

404-
void start_object() const final
404+
inline void start_object() const final
405405
{
406406
_pimpl->start_object();
407407
}
408408

409-
void add_member(const std::string& key) const final
409+
inline void add_member(const std::string& key) const final
410410
{
411411
_pimpl->add_member(key);
412412
}
413413

414-
void end_object() const final
414+
inline void end_object() const final
415415
{
416416
_pimpl->end_object();
417417
}
418418

419-
void start_array() const final
419+
inline void start_array() const final
420420
{
421421
_pimpl->start_array();
422422
}
423423

424-
void end_arrary() const final
424+
inline void end_arrary() const final
425425
{
426426
_pimpl->end_arrary();
427427
}
428428

429-
void write_null() const final
429+
inline void write_null() const final
430430
{
431431
_pimpl->write_null();
432432
}
433433

434-
void write_string(const std::string& value) const final
434+
inline void write_string(const std::string& value) const final
435435
{
436436
_pimpl->write_string(value);
437437
}
@@ -441,12 +441,12 @@ class [[nodiscard]] Writer final
441441
_pimpl->write_bool(value);
442442
}
443443

444-
void write_int(int value) const final
444+
inline void write_int(int value) const final
445445
{
446446
_pimpl->write_int(value);
447447
}
448448

449-
void write_float(double value) const final
449+
inline void write_float(double value) const final
450450
{
451451
_pimpl->write_float(value);
452452
}
@@ -459,7 +459,7 @@ class [[nodiscard]] Writer final
459459

460460
public:
461461
template <class T>
462-
Writer(std::unique_ptr<T> writer)
462+
inline Writer(std::unique_ptr<T> writer)
463463
: _concept { std::static_pointer_cast<const Concept>(
464464
std::make_shared<Model<T>>(std::move(writer))) }
465465
{

0 commit comments

Comments
 (0)