Skip to content

Commit 294ce71

Browse files
committed
Reformat code with make format
1 parent 8d747d7 commit 294ce71

Some content is hidden

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

53 files changed

+566
-573
lines changed

sigc++/adaptors/adaptor_trait.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ namespace sigc
8282
*
8383
* @ingroup adaptors
8484
*/
85-
template <typename T_functor>
85+
template<typename T_functor>
8686
struct adaptor_functor : public adaptor_base
8787
{
8888
/** Invokes the wrapped functor passing on the arguments.
@@ -94,7 +94,7 @@ struct adaptor_functor : public adaptor_base
9494
* @param arg Arguments to be passed on to the functor.
9595
* @return The return value of the functor invocation.
9696
*/
97-
template <typename... T_arg>
97+
template<typename... T_arg>
9898
decltype(auto) operator()(T_arg&&... arg) const
9999
{
100100
return std::invoke(functor_, std::forward<T_arg>(arg)...);
@@ -112,7 +112,7 @@ struct adaptor_functor : public adaptor_base
112112
* function pointer.
113113
* @param type Pointer to function or class method to invoke from operator()().
114114
*/
115-
template <typename T_type>
115+
template<typename T_type>
116116
explicit adaptor_functor(const T_type& type) : functor_(type)
117117
{
118118
}
@@ -129,10 +129,10 @@ struct adaptor_functor : public adaptor_base
129129
*
130130
* @ingroup adaptors
131131
*/
132-
template <typename T_functor>
132+
template<typename T_functor>
133133
struct visitor<adaptor_functor<T_functor>>
134134
{
135-
template <typename T_action>
135+
template<typename T_action>
136136
static void do_visit_each(const T_action& action, const adaptor_functor<T_functor>& target)
137137
{
138138
sigc::visit_each(action, target.functor_);
@@ -149,15 +149,14 @@ struct visitor<adaptor_functor<T_functor>>
149149
*
150150
* @ingroup adaptors
151151
*/
152-
template <typename T_functor, bool I_isadaptor = std::is_base_of<adaptor_base, T_functor>::value>
152+
template<typename T_functor, bool I_isadaptor = std::is_base_of<adaptor_base, T_functor>::value>
153153
struct adaptor_trait;
154154

155-
156155
/** Trait that specifies the adaptor version of a functor type.
157156
* This template specialization is used for types that inherit from adaptor_base.
158157
* adaptor_type is equal to @p T_functor in this case.
159158
*/
160-
template <typename T_functor>
159+
template<typename T_functor>
161160
struct adaptor_trait<T_functor, true>
162161
{
163162
using adaptor_type = T_functor;
@@ -169,7 +168,7 @@ struct adaptor_trait<T_functor, true>
169168
* The latter are converted into @p pointer_functor or @p mem_functor types.
170169
* adaptor_type is equal to @p adaptor_functor<functor_type>.
171170
*/
172-
template <typename T_functor>
171+
template<typename T_functor>
173172
struct adaptor_trait<T_functor, false>
174173
{
175174
private:

sigc++/adaptors/adapts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ namespace sigc
9191
*
9292
* @ingroup adaptors
9393
*/
94-
template <typename T_functor>
94+
template<typename T_functor>
9595
struct adapts : public adaptor_base
9696
{
9797
private:

sigc++/adaptors/bind.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ namespace sigc
102102
namespace internal
103103
{
104104

105-
template <typename T_element>
105+
template<typename T_element>
106106
struct TransformEachInvoker
107107
{
108108
// We take T_element as non-const because invoke() is not const.
@@ -122,15 +122,15 @@ struct TransformEachInvoker
122122
*
123123
* @ingroup bind
124124
*/
125-
template <int I_location, typename T_functor, typename... T_bound>
125+
template<int I_location, typename T_functor, typename... T_bound>
126126
struct bind_functor : public adapts<T_functor>
127127
{
128128
/** Invokes the wrapped functor passing on the arguments.
129129
* bound_ is passed as the next argument.
130130
* @param arg Arguments to be passed on to the functor.
131131
* @return The return value of the functor invocation.
132132
*/
133-
template <typename... T_arg>
133+
template<typename... T_arg>
134134
decltype(auto) operator()(T_arg&&... arg)
135135
{
136136
// For instance, if I_location is 1, and arg has 4 arguments,
@@ -171,7 +171,7 @@ struct bind_functor : public adapts<T_functor>
171171
*
172172
* @ingroup bind
173173
*/
174-
template <typename T_functor, typename... T_type>
174+
template<typename T_functor, typename... T_type>
175175
struct bind_functor<-1, T_functor, T_type...> : public adapts<T_functor>
176176
{
177177
public:
@@ -180,7 +180,7 @@ struct bind_functor<-1, T_functor, T_type...> : public adapts<T_functor>
180180
* @param arg Arguments to be passed on to the functor.
181181
* @return The return value of the functor invocation.
182182
*/
183-
template <typename... T_arg>
183+
template<typename... T_arg>
184184
decltype(auto) operator()(T_arg&&... arg)
185185
{
186186
// For instance, if arg has 4 arguments,
@@ -215,12 +215,12 @@ struct bind_functor<-1, T_functor, T_type...> : public adapts<T_functor>
215215
*
216216
* @ingroup bind
217217
*/
218-
template <int T_loc, typename T_functor, typename... T_bound>
218+
template<int T_loc, typename T_functor, typename... T_bound>
219219
struct visitor<bind_functor<T_loc, T_functor, T_bound...>>
220220
{
221-
template <typename T_action>
222-
static void do_visit_each(
223-
const T_action& action, const bind_functor<T_loc, T_functor, T_bound...>& target)
221+
template<typename T_action>
222+
static void do_visit_each(const T_action& action,
223+
const bind_functor<T_loc, T_functor, T_bound...>& target)
224224
{
225225
sigc::visit_each(action, target.functor_);
226226
sigc::visit_each(action, std::get<0>(target.bound_));
@@ -234,12 +234,12 @@ struct visitor<bind_functor<T_loc, T_functor, T_bound...>>
234234
*
235235
* @ingroup bind
236236
*/
237-
template <typename T_functor, typename... T_type>
237+
template<typename T_functor, typename... T_type>
238238
struct visitor<bind_functor<-1, T_functor, T_type...>>
239239
{
240-
template <typename T_action>
241-
static void do_visit_each(
242-
const T_action& action, const bind_functor<-1, T_functor, T_type...>& target)
240+
template<typename T_action>
241+
static void do_visit_each(const T_action& action,
242+
const bind_functor<-1, T_functor, T_type...>& target)
243243
{
244244
sigc::visit_each(action, target.functor_);
245245

@@ -260,7 +260,7 @@ struct visitor<bind_functor<-1, T_functor, T_type...>>
260260
*
261261
* @ingroup bind
262262
*/
263-
template <int I_location, typename T_functor, typename... T_bound>
263+
template<int I_location, typename T_functor, typename... T_bound>
264264
inline decltype(auto)
265265
bind(const T_functor& func, T_bound... b)
266266
{
@@ -277,7 +277,7 @@ bind(const T_functor& func, T_bound... b)
277277
*
278278
* @ingroup bind
279279
*/
280-
template <typename T_functor, typename... T_type>
280+
template<typename T_functor, typename... T_type>
281281
inline decltype(auto)
282282
bind(const T_functor& func, T_type... b)
283283
{

sigc++/adaptors/bind_return.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace sigc
3434
*
3535
* @ingroup bind
3636
*/
37-
template <typename T_return, typename T_functor>
37+
template<typename T_return, typename T_functor>
3838
struct bind_return_functor : public adapts<T_functor>
3939
{
4040
/** Invokes the wrapped functor dropping its return value.
@@ -46,7 +46,7 @@ struct bind_return_functor : public adapts<T_functor>
4646
* @param a Arguments to be passed on to the functor.
4747
* @return The fixed return value.
4848
*/
49-
template <typename... T_arg>
49+
template<typename... T_arg>
5050
inline typename unwrap_reference<T_return>::type operator()(T_arg... a)
5151
{
5252
std::invoke(this->functor_, a...);
@@ -57,8 +57,7 @@ struct bind_return_functor : public adapts<T_functor>
5757
* @param functor Functor to invoke from operator()().
5858
* @param ret_value Value to return from operator()().
5959
*/
60-
bind_return_functor(
61-
type_trait_take_t<T_functor> functor, type_trait_take_t<T_return> ret_value)
60+
bind_return_functor(type_trait_take_t<T_functor> functor, type_trait_take_t<T_return> ret_value)
6261
: adapts<T_functor>(functor), ret_value_(ret_value)
6362
{
6463
}
@@ -67,7 +66,7 @@ struct bind_return_functor : public adapts<T_functor>
6766
bound_argument<T_return> ret_value_; // public, so that visit_each() can access it
6867
};
6968

70-
template <typename T_return, typename T_functor>
69+
template<typename T_return, typename T_functor>
7170
typename unwrap_reference<T_return>::type
7271
bind_return_functor<T_return, T_functor>::operator()()
7372
{
@@ -83,12 +82,12 @@ bind_return_functor<T_return, T_functor>::operator()()
8382
*
8483
* @ingroup bind
8584
*/
86-
template <typename T_return, typename T_functor>
85+
template<typename T_return, typename T_functor>
8786
struct visitor<bind_return_functor<T_return, T_functor>>
8887
{
89-
template <typename T_action>
90-
static void do_visit_each(
91-
const T_action& action, const bind_return_functor<T_return, T_functor>& target)
88+
template<typename T_action>
89+
static void do_visit_each(const T_action& action,
90+
const bind_return_functor<T_return, T_functor>& target)
9291
{
9392
sigc::visit_each(action, target.ret_value_);
9493
sigc::visit_each(action, target.functor_);
@@ -105,7 +104,7 @@ struct visitor<bind_return_functor<T_return, T_functor>>
105104
*
106105
* @ingroup bind
107106
*/
108-
template <typename T_return, typename T_functor>
107+
template<typename T_return, typename T_functor>
109108
inline bind_return_functor<T_return, T_functor>
110109
bind_return(const T_functor& functor, T_return ret_value)
111110
{

sigc++/adaptors/bound_argument.h

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace sigc
4646
* The general template implementation is used for parameters that are passed by value.
4747
* @e T_type The type of the bound argument.
4848
*/
49-
template <typename T_type>
49+
template<typename T_type>
5050
class bound_argument
5151
{
5252
public:
@@ -76,17 +76,14 @@ class bound_argument
7676
* returned by bind_return() by reference, specialized for std::reference_wrapper<> types.
7777
* @e T_wrapped The type of the bound argument.
7878
*/
79-
template <typename T_wrapped>
79+
template<typename T_wrapped>
8080
class bound_argument<std::reference_wrapper<T_wrapped>>
8181
{
8282
public:
8383
/** Constructor.
8484
* @param arg The argument to bind.
8585
*/
86-
bound_argument(const std::reference_wrapper<T_wrapped>& arg)
87-
: visited_(unwrap(arg))
88-
{
89-
}
86+
bound_argument(const std::reference_wrapper<T_wrapped>& arg) : visited_(unwrap(arg)) {}
9087

9188
/** Retrieve the entity to visit in visit_each().
9289
* @return The limited_reference to the bound argument.
@@ -108,17 +105,14 @@ class bound_argument<std::reference_wrapper<T_wrapped>>
108105
* returned by bind_return() by const reference, specialized for const reference_wrapper<> types.
109106
* - @e T_wrapped The type of the bound argument.
110107
*/
111-
template <typename T_wrapped>
108+
template<typename T_wrapped>
112109
class bound_argument<std::reference_wrapper<const T_wrapped>>
113110
{
114111
public:
115112
/** Constructor.
116113
* @param arg The argument to bind.
117114
*/
118-
bound_argument(const std::reference_wrapper<const T_wrapped>& arg)
119-
: visited_(unwrap(arg))
120-
{
121-
}
115+
bound_argument(const std::reference_wrapper<const T_wrapped>& arg) : visited_(unwrap(arg)) {}
122116

123117
/** Retrieve the entity to visit in visit_each().
124118
* @return The const_limited_reference to the bound argument.
@@ -145,10 +139,10 @@ class bound_argument<std::reference_wrapper<const T_wrapped>>
145139
* @param action The functor to invoke.
146140
* @param arg The visited instance.
147141
*/
148-
template <typename T_type>
142+
template<typename T_type>
149143
struct visitor<bound_argument<T_type>>
150144
{
151-
template <typename T_action>
145+
template<typename T_action>
152146
static void do_visit_each(const T_action& action, const bound_argument<T_type>& arg)
153147
{
154148
sigc::visit_each(action, arg.visit());

sigc++/adaptors/compose.h

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ namespace sigc
5959
*
6060
* @ingroup compose
6161
*/
62-
template <typename T_setter, typename T_getter>
62+
template<typename T_setter, typename T_getter>
6363
struct compose1_functor : public adapts<T_setter>
6464
{
65-
template <typename... T_arg>
65+
template<typename... T_arg>
6666
decltype(auto) operator()(T_arg&&... a)
6767
{
6868
return std::invoke(this->functor_, get_(std::forward<T_arg>(a)...));
@@ -91,10 +91,10 @@ struct compose1_functor : public adapts<T_setter>
9191
*
9292
* @ingroup compose
9393
*/
94-
template <typename T_setter, typename T_getter1, typename T_getter2>
94+
template<typename T_setter, typename T_getter1, typename T_getter2>
9595
struct compose2_functor : public adapts<T_setter>
9696
{
97-
template <typename... T_arg>
97+
template<typename... T_arg>
9898
decltype(auto) operator()(T_arg... a)
9999
{
100100
return std::invoke(this->functor_, get1_(a...), get2_(a...));
@@ -106,8 +106,7 @@ struct compose2_functor : public adapts<T_setter>
106106
* @param getter1 Functor to invoke from operator()().
107107
* @param getter2 Functor to invoke from operator()().
108108
*/
109-
compose2_functor(
110-
const T_setter& setter, const T_getter1& getter1, const T_getter2& getter2)
109+
compose2_functor(const T_setter& setter, const T_getter1& getter1, const T_getter2& getter2)
111110
: adapts<T_setter>(setter), get1_(getter1), get2_(getter2)
112111
{
113112
}
@@ -124,12 +123,12 @@ struct compose2_functor : public adapts<T_setter>
124123
*
125124
* @ingroup compose
126125
*/
127-
template <typename T_setter, typename T_getter>
126+
template<typename T_setter, typename T_getter>
128127
struct visitor<compose1_functor<T_setter, T_getter>>
129128
{
130-
template <typename T_action>
131-
static void do_visit_each(
132-
const T_action& action, const compose1_functor<T_setter, T_getter>& target)
129+
template<typename T_action>
130+
static void do_visit_each(const T_action& action,
131+
const compose1_functor<T_setter, T_getter>& target)
133132
{
134133
sigc::visit_each(action, target.functor_);
135134
sigc::visit_each(action, target.get_);
@@ -143,12 +142,12 @@ struct visitor<compose1_functor<T_setter, T_getter>>
143142
*
144143
* @ingroup compose
145144
*/
146-
template <typename T_setter, typename T_getter1, typename T_getter2>
145+
template<typename T_setter, typename T_getter1, typename T_getter2>
147146
struct visitor<compose2_functor<T_setter, T_getter1, T_getter2>>
148147
{
149-
template <typename T_action>
150-
static void do_visit_each(
151-
const T_action& action, const compose2_functor<T_setter, T_getter1, T_getter2>& target)
148+
template<typename T_action>
149+
static void do_visit_each(const T_action& action,
150+
const compose2_functor<T_setter, T_getter1, T_getter2>& target)
152151
{
153152
sigc::visit_each(action, target.functor_);
154153
sigc::visit_each(action, target.get1_);
@@ -166,7 +165,7 @@ struct visitor<compose2_functor<T_setter, T_getter1, T_getter2>>
166165
*
167166
* @ingroup compose
168167
*/
169-
template <typename T_setter, typename T_getter>
168+
template<typename T_setter, typename T_getter>
170169
inline compose1_functor<T_setter, T_getter>
171170
compose(const T_setter& setter, const T_getter& getter)
172171
{
@@ -184,7 +183,7 @@ compose(const T_setter& setter, const T_getter& getter)
184183
*
185184
* @ingroup compose
186185
*/
187-
template <typename T_setter, typename T_getter1, typename T_getter2>
186+
template<typename T_setter, typename T_getter1, typename T_getter2>
188187
inline compose2_functor<T_setter, T_getter1, T_getter2>
189188
compose(const T_setter& setter, const T_getter1& getter1, const T_getter2& getter2)
190189
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy