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:
Markus Mäkelä
2019-05-09 10:43:09 +03:00
parent 50b5fe76ef
commit b4e8f79c5f
30 changed files with 331 additions and 334 deletions

View File

@ -245,9 +245,7 @@ enum DurationUnit
DURATION_IN_MILLISECONDS,
DURATION_IN_DEFAULT
};
}
}
/**

View File

@ -291,7 +291,8 @@ public:
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;
private:
@ -320,7 +321,8 @@ public:
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;
protected:
@ -403,8 +405,8 @@ private:
: ParamNumber(pSpecification, zName, zDescription, kind, MXS_MODULE_PARAM_COUNT,
default_value,
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(max_value <= std::numeric_limits<uint32_t>::max());
@ -473,10 +475,10 @@ private:
value_type max_value)
: ParamNumber(pSpecification, zName, zDescription, kind, MXS_MODULE_PARAM_INT,
default_value,
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())
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())
{
mxb_assert(min_value >= std::numeric_limits<int32_t>::min());
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 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;
private:
@ -572,7 +575,8 @@ public:
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;
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 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;
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 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;
private:
@ -739,7 +745,8 @@ public:
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;
private:
@ -1176,17 +1183,17 @@ public:
};
/*
template<class T>
inline bool operator < (const Duration<T>& lhs, const Duration<T>& rhs)
{
return lhs.get() < rhs.get();
}
template<class T>
inline bool operator > (const Duration<T>& lhs, const Duration<T>& rhs)
{
return lhs.get() > rhs.get();
}
* template<class T>
* inline bool operator < (const Duration<T>& lhs, const Duration<T>& rhs)
* {
* return lhs.get() < rhs.get();
* }
*
* template<class T>
* inline bool operator > (const Duration<T>& lhs, const Duration<T>& rhs)
* {
* 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];
}
}

View File

@ -75,7 +75,7 @@ private:
, nextdue(time(0) + frequency)
, id(0)
{
};
}
std::string name;
TASKFN func;
@ -90,5 +90,4 @@ private:
std::map<std::string, Task> m_tasks_by_name;
};
}

View File

@ -836,7 +836,6 @@ private:
void pre_loop() final;
void post_loop() final;
};
/**

View File

@ -138,7 +138,6 @@ namespace maxscale
*/
std::unique_ptr<mxq::QueryResult> execute_query(MYSQL* conn, const std::string& query,
std::string* errmsg_out = NULL);
}
MXS_END_DECLS

View File

@ -67,7 +67,8 @@ struct CloserTraits<pcre2_match_data*>
namespace std
{
template<> class default_delete<pcre2_code>
template<>
class default_delete<pcre2_code>
{
public:
void operator()(pcre2_code* p)
@ -78,6 +79,4 @@ public:
}
}
};
}

View File

@ -657,7 +657,8 @@ private:
static maxbase::Duration s_watchdog_interval; /*< Duration between notifications, if any. */
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. */
};

View File

@ -550,5 +550,4 @@ bool server_set_status(SERVER* server, int bit, std::string* errmsg_out = NULL);
* @param errmsg_out Error output
*/
bool server_clear_status(SERVER* server, int bit, std::string* errmsg_out = NULL);
}

View File

@ -155,8 +155,8 @@ public:
protected:
SERVICE(const std::string& name,
const std::string& router_name)
: m_name(name) /** Service name. */
, m_router_name(router_name) /** Router module. */
: m_name(name)
, m_router_name(router_name)
{
}

View File

@ -312,7 +312,8 @@ template<typename T>
class EqualPointees : public std::unary_function<T, bool>
{
public:
EqualPointees(const T& lhs) : m_ppLhs(&lhs)
EqualPointees(const T& lhs)
: m_ppLhs(&lhs)
{
}
bool operator()(const T& pRhs)

View File

@ -42,7 +42,6 @@ namespace
{
MXS_CONFIG_PARAMETER empty;
}
/**
* test1 Filter creation, finding and deletion

View File

@ -84,7 +84,6 @@ int test()
return rc;
}
}
int main(int argc, char** argv)

View File

@ -72,7 +72,6 @@ int test_checksums()
return 0;
}
}
int main(int argc, char* argv[])

View File

@ -1055,11 +1055,11 @@ nl_constr_init_args = add # 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.
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 {}
# 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() { }'
# 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
# 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.
nl_func_paren = remove # ignore/add/remove/force