Format core sources again
Formatted with nl_func_type_name and related options set to ignore. This keeps the formatting intact for long return types in declarations and definitions.
This commit is contained in:
@ -245,9 +245,7 @@ enum DurationUnit
|
|||||||
DURATION_IN_MILLISECONDS,
|
DURATION_IN_MILLISECONDS,
|
||||||
DURATION_IN_DEFAULT
|
DURATION_IN_DEFAULT
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -291,7 +291,8 @@ public:
|
|||||||
|
|
||||||
bool set(Type& value, const std::string& value_as_string) const override;
|
bool set(Type& value, const std::string& value_as_string) const override;
|
||||||
|
|
||||||
bool from_string(const std::string& value, value_type* pValue, std::string* pMessage = nullptr) const;
|
bool from_string(const std::string& value, value_type* pValue,
|
||||||
|
std::string* pMessage = nullptr) const;
|
||||||
std::string to_string(value_type value) const;
|
std::string to_string(value_type value) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -320,7 +321,8 @@ public:
|
|||||||
|
|
||||||
bool set(Type& value, const std::string& value_as_string) const override;
|
bool set(Type& value, const std::string& value_as_string) const override;
|
||||||
|
|
||||||
bool from_string(const std::string& value, value_type* pValue, std::string* pMessage = nullptr) const;
|
bool from_string(const std::string& value, value_type* pValue,
|
||||||
|
std::string* pMessage = nullptr) const;
|
||||||
std::string to_string(value_type value) const;
|
std::string to_string(value_type value) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -403,8 +405,8 @@ private:
|
|||||||
: ParamNumber(pSpecification, zName, zDescription, kind, MXS_MODULE_PARAM_COUNT,
|
: ParamNumber(pSpecification, zName, zDescription, kind, MXS_MODULE_PARAM_COUNT,
|
||||||
default_value,
|
default_value,
|
||||||
min_value >= 0 ? min_value : 0,
|
min_value >= 0 ? min_value : 0,
|
||||||
max_value <= std::numeric_limits<uint32_t>::max()
|
max_value <= std::numeric_limits<uint32_t>::max() ?
|
||||||
? max_value : std::numeric_limits<uint32_t>::max())
|
max_value : std::numeric_limits<uint32_t>::max())
|
||||||
{
|
{
|
||||||
mxb_assert(min_value >= 0);
|
mxb_assert(min_value >= 0);
|
||||||
mxb_assert(max_value <= std::numeric_limits<uint32_t>::max());
|
mxb_assert(max_value <= std::numeric_limits<uint32_t>::max());
|
||||||
@ -473,10 +475,10 @@ private:
|
|||||||
value_type max_value)
|
value_type max_value)
|
||||||
: ParamNumber(pSpecification, zName, zDescription, kind, MXS_MODULE_PARAM_INT,
|
: ParamNumber(pSpecification, zName, zDescription, kind, MXS_MODULE_PARAM_INT,
|
||||||
default_value,
|
default_value,
|
||||||
min_value >= std::numeric_limits<int32_t>::min()
|
min_value >= std::numeric_limits<int32_t>::min() ?
|
||||||
? min_value : std::numeric_limits<int32_t>::min(),
|
min_value : std::numeric_limits<int32_t>::min(),
|
||||||
max_value <= std::numeric_limits<int32_t>::max()
|
max_value <= std::numeric_limits<int32_t>::max() ?
|
||||||
? max_value : std::numeric_limits<int32_t>::max())
|
max_value : std::numeric_limits<int32_t>::max())
|
||||||
{
|
{
|
||||||
mxb_assert(min_value >= std::numeric_limits<int32_t>::min());
|
mxb_assert(min_value >= std::numeric_limits<int32_t>::min());
|
||||||
mxb_assert(max_value <= std::numeric_limits<int32_t>::max());
|
mxb_assert(max_value <= std::numeric_limits<int32_t>::max());
|
||||||
@ -517,7 +519,8 @@ public:
|
|||||||
|
|
||||||
bool set(Type& value, const std::string& value_as_string) const override;
|
bool set(Type& value, const std::string& value_as_string) const override;
|
||||||
|
|
||||||
bool from_string(const std::string& value, value_type* pValue, std::string* pMessage = nullptr) const;
|
bool from_string(const std::string& value, value_type* pValue,
|
||||||
|
std::string* pMessage = nullptr) const;
|
||||||
std::string to_string(const value_type& value) const;
|
std::string to_string(const value_type& value) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -572,7 +575,8 @@ public:
|
|||||||
|
|
||||||
bool set(Type& value, const std::string& value_as_string) const override;
|
bool set(Type& value, const std::string& value_as_string) const override;
|
||||||
|
|
||||||
bool from_string(const std::string& value, value_type* pValue, std::string* pMessage = nullptr) const;
|
bool from_string(const std::string& value, value_type* pValue,
|
||||||
|
std::string* pMessage = nullptr) const;
|
||||||
std::string to_string(value_type value) const;
|
std::string to_string(value_type value) const;
|
||||||
|
|
||||||
void populate(MXS_MODULE_PARAM& param) const;
|
void populate(MXS_MODULE_PARAM& param) const;
|
||||||
@ -636,7 +640,8 @@ public:
|
|||||||
|
|
||||||
bool set(Type& value, const std::string& value_as_string) const override;
|
bool set(Type& value, const std::string& value_as_string) const override;
|
||||||
|
|
||||||
bool from_string(const std::string& value, value_type* pValue, std::string* pMessage = nullptr) const;
|
bool from_string(const std::string& value, value_type* pValue,
|
||||||
|
std::string* pMessage = nullptr) const;
|
||||||
std::string to_string(const value_type& value) const;
|
std::string to_string(const value_type& value) const;
|
||||||
|
|
||||||
void populate(MXS_MODULE_PARAM& param) const;
|
void populate(MXS_MODULE_PARAM& param) const;
|
||||||
@ -690,7 +695,8 @@ public:
|
|||||||
|
|
||||||
bool set(Type& value, const std::string& value_as_string) const override;
|
bool set(Type& value, const std::string& value_as_string) const override;
|
||||||
|
|
||||||
bool from_string(const std::string& value, value_type* pValue, std::string* pMessage = nullptr) const;
|
bool from_string(const std::string& value, value_type* pValue,
|
||||||
|
std::string* pMessage = nullptr) const;
|
||||||
std::string to_string(value_type value) const;
|
std::string to_string(value_type value) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -739,7 +745,8 @@ public:
|
|||||||
|
|
||||||
bool set(Type& value, const std::string& value_as_string) const override;
|
bool set(Type& value, const std::string& value_as_string) const override;
|
||||||
|
|
||||||
bool from_string(const std::string& value, value_type* pValue, std::string* pMessage = nullptr) const;
|
bool from_string(const std::string& value, value_type* pValue,
|
||||||
|
std::string* pMessage = nullptr) const;
|
||||||
std::string to_string(value_type value) const;
|
std::string to_string(value_type value) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -1176,17 +1183,17 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
template<class T>
|
* template<class T>
|
||||||
inline bool operator < (const Duration<T>& lhs, const Duration<T>& rhs)
|
* inline bool operator < (const Duration<T>& lhs, const Duration<T>& rhs)
|
||||||
{
|
* {
|
||||||
return lhs.get() < rhs.get();
|
* return lhs.get() < rhs.get();
|
||||||
}
|
* }
|
||||||
|
*
|
||||||
template<class T>
|
* template<class T>
|
||||||
inline bool operator > (const Duration<T>& lhs, const Duration<T>& rhs)
|
* inline bool operator > (const Duration<T>& lhs, const Duration<T>& rhs)
|
||||||
{
|
* {
|
||||||
return lhs.get() > rhs.get();
|
* return lhs.get() > rhs.get();
|
||||||
}
|
* }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1501,6 +1508,4 @@ void ParamEnum<T>::populate(MXS_MODULE_PARAM& param) const
|
|||||||
|
|
||||||
param.accepted_values = &m_enum_values[0];
|
param.accepted_values = &m_enum_values[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,7 @@ private:
|
|||||||
, nextdue(time(0) + frequency)
|
, nextdue(time(0) + frequency)
|
||||||
, id(0)
|
, id(0)
|
||||||
{
|
{
|
||||||
};
|
}
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
TASKFN func;
|
TASKFN func;
|
||||||
@ -90,5 +90,4 @@ private:
|
|||||||
|
|
||||||
std::map<std::string, Task> m_tasks_by_name;
|
std::map<std::string, Task> m_tasks_by_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -836,7 +836,6 @@ private:
|
|||||||
|
|
||||||
void pre_loop() final;
|
void pre_loop() final;
|
||||||
void post_loop() final;
|
void post_loop() final;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -138,7 +138,6 @@ namespace maxscale
|
|||||||
*/
|
*/
|
||||||
std::unique_ptr<mxq::QueryResult> execute_query(MYSQL* conn, const std::string& query,
|
std::unique_ptr<mxq::QueryResult> execute_query(MYSQL* conn, const std::string& query,
|
||||||
std::string* errmsg_out = NULL);
|
std::string* errmsg_out = NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MXS_END_DECLS
|
MXS_END_DECLS
|
||||||
|
|||||||
@ -67,7 +67,8 @@ struct CloserTraits<pcre2_match_data*>
|
|||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
|
|
||||||
template<> class default_delete<pcre2_code>
|
template<>
|
||||||
|
class default_delete<pcre2_code>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void operator()(pcre2_code* p)
|
void operator()(pcre2_code* p)
|
||||||
@ -78,6 +79,4 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -657,7 +657,8 @@ private:
|
|||||||
|
|
||||||
static maxbase::Duration s_watchdog_interval; /*< Duration between notifications, if any. */
|
static maxbase::Duration s_watchdog_interval; /*< Duration between notifications, if any. */
|
||||||
static maxbase::TimePoint s_watchdog_next_check;/*< Next time to notify systemd. */
|
static maxbase::TimePoint s_watchdog_next_check;/*< Next time to notify systemd. */
|
||||||
std::atomic<bool> m_alive; /*< Set to true in epoll_tick(), false on notification. */
|
std::atomic<bool> m_alive; /*< Set to true in epoll_tick(), false on
|
||||||
|
* notification. */
|
||||||
WatchdogNotifier* m_pWatchdog_notifier; /*< Watchdog notifier, if systemd enabled. */
|
WatchdogNotifier* m_pWatchdog_notifier; /*< Watchdog notifier, if systemd enabled. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -550,5 +550,4 @@ bool server_set_status(SERVER* server, int bit, std::string* errmsg_out = NULL);
|
|||||||
* @param errmsg_out Error output
|
* @param errmsg_out Error output
|
||||||
*/
|
*/
|
||||||
bool server_clear_status(SERVER* server, int bit, std::string* errmsg_out = NULL);
|
bool server_clear_status(SERVER* server, int bit, std::string* errmsg_out = NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,8 +155,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
SERVICE(const std::string& name,
|
SERVICE(const std::string& name,
|
||||||
const std::string& router_name)
|
const std::string& router_name)
|
||||||
: m_name(name) /** Service name. */
|
: m_name(name)
|
||||||
, m_router_name(router_name) /** Router module. */
|
, m_router_name(router_name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -312,7 +312,8 @@ template<typename T>
|
|||||||
class EqualPointees : public std::unary_function<T, bool>
|
class EqualPointees : public std::unary_function<T, bool>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EqualPointees(const T& lhs) : m_ppLhs(&lhs)
|
EqualPointees(const T& lhs)
|
||||||
|
: m_ppLhs(&lhs)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
bool operator()(const T& pRhs)
|
bool operator()(const T& pRhs)
|
||||||
|
|||||||
@ -42,7 +42,6 @@ namespace
|
|||||||
{
|
{
|
||||||
|
|
||||||
MXS_CONFIG_PARAMETER empty;
|
MXS_CONFIG_PARAMETER empty;
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* test1 Filter creation, finding and deletion
|
* test1 Filter creation, finding and deletion
|
||||||
|
|||||||
@ -84,7 +84,6 @@ int test()
|
|||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
|
|||||||
@ -72,7 +72,6 @@ int test_checksums()
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
|
|||||||
@ -1055,11 +1055,11 @@ nl_constr_init_args = add # ignore/add/remove/force
|
|||||||
nl_enum_own_lines = ignore # ignore/add/remove/force
|
nl_enum_own_lines = ignore # ignore/add/remove/force
|
||||||
|
|
||||||
# Add or remove newline between return type and function name in a function definition.
|
# Add or remove newline between return type and function name in a function definition.
|
||||||
nl_func_type_name = remove # ignore/add/remove/force
|
nl_func_type_name = ignore # ignore/add/remove/force
|
||||||
|
|
||||||
# Add or remove newline between return type and function name inside a class {}
|
# Add or remove newline between return type and function name inside a class {}
|
||||||
# Uses nl_func_type_name or nl_func_proto_type_name if set to ignore.
|
# Uses nl_func_type_name or nl_func_proto_type_name if set to ignore.
|
||||||
nl_func_type_name_class = remove # ignore/add/remove/force
|
nl_func_type_name_class = ignore # ignore/add/remove/force
|
||||||
|
|
||||||
# Add or remove newline between class specification and '::' in 'void A::f() { }'
|
# Add or remove newline between class specification and '::' in 'void A::f() { }'
|
||||||
# Only appears in separate member implementation (does not appear with in-line implmementation).
|
# Only appears in separate member implementation (does not appear with in-line implmementation).
|
||||||
@ -1070,7 +1070,7 @@ nl_func_class_scope = remove # ignore/add/remove/force
|
|||||||
nl_func_scope_name = remove # ignore/add/remove/force
|
nl_func_scope_name = remove # ignore/add/remove/force
|
||||||
|
|
||||||
# Add or remove newline between return type and function name in a prototype.
|
# Add or remove newline between return type and function name in a prototype.
|
||||||
nl_func_proto_type_name = remove # ignore/add/remove/force
|
nl_func_proto_type_name = ignore # ignore/add/remove/force
|
||||||
|
|
||||||
# Add or remove newline between a function name and the opening '(' in the declaration.
|
# Add or remove newline between a function name and the opening '(' in the declaration.
|
||||||
nl_func_paren = remove # ignore/add/remove/force
|
nl_func_paren = remove # ignore/add/remove/force
|
||||||
|
|||||||
Reference in New Issue
Block a user