Format all C++ and Java code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 14:32:37 +07:00
parent 9f0290c0ec
commit bfffa1fff4
2169 changed files with 56441 additions and 64188 deletions

View File

@@ -25,9 +25,8 @@ private:
};
template <typename Fn, typename... Args>
std::invoke_result_t<Fn&&, Args&&...> ExceptionCatcher(std::string const & comment,
bool & exceptionWasThrown, Fn && fn,
Args &&... args) noexcept
std::invoke_result_t<Fn &&, Args &&...> ExceptionCatcher(std::string const & comment, bool & exceptionWasThrown,
Fn && fn, Args &&... args) noexcept
{
try
{
@@ -48,24 +47,24 @@ std::invoke_result_t<Fn&&, Args&&...> ExceptionCatcher(std::string const & comme
}
exceptionWasThrown = true;
using ReturnType = std::decay_t<std::invoke_result_t<Fn&&, Args&&...>>;
using ReturnType = std::decay_t<std::invoke_result_t<Fn &&, Args &&...>>;
if constexpr (!std::is_same_v<void, ReturnType>)
{
static const ReturnType defaultResult = {};
static ReturnType const defaultResult = {};
return defaultResult;
}
}
#define DECLARE_EXCEPTION(exception_name, base_exception) \
class exception_name : public base_exception \
{ \
public: \
#define DECLARE_EXCEPTION(exception_name, base_exception) \
class exception_name : public base_exception \
{ \
public: \
exception_name(char const * what, std::string const & msg) : base_exception(what, msg) {} \
}
// TODO: Use SRC_LOGGING macro.
#define MYTHROW(exception_name, msg) throw exception_name( \
#exception_name " " __FILE__ ":" TO_STRING(__LINE__), ::base::Message msg)
#define MYTHROW(exception_name, msg) \
throw exception_name(#exception_name " " __FILE__ ":" TO_STRING(__LINE__), ::base::Message msg)
#define MYTHROW1(exception_name, param1, msg) throw exception_name(param1, \
#exception_name " " __FILE__ ":" TO_STRING(__LINE__), ::base::Message msg)
#define MYTHROW1(exception_name, param1, msg) \
throw exception_name(param1, #exception_name " " __FILE__ ":" TO_STRING(__LINE__), ::base::Message msg)