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

@@ -26,16 +26,16 @@ public:
return m_engine != nullptr;
}
template <typename Function, typename ... Args>
void SafeCall(Function && f, Args && ... functionArgs)
template <typename Function, typename... Args>
void SafeCall(Function && f, Args &&... functionArgs)
{
std::lock_guard<std::mutex> lock(m_mutex);
if (m_engine != nullptr)
(m_engine.get()->*f)(std::forward<Args>(functionArgs)...);
}
template <typename Function, typename ... Args>
dp::DrapeID SafeCallWithResult(Function && f, Args && ... functionArgs)
template <typename Function, typename... Args>
dp::DrapeID SafeCallWithResult(Function && f, Args &&... functionArgs)
{
std::lock_guard<std::mutex> lock(m_mutex);
if (m_engine != nullptr)
@@ -53,16 +53,9 @@ private:
class DrapeEngineLockGuard
{
public:
explicit DrapeEngineLockGuard(DrapeEngineSafePtr & enginePtr)
: m_ptr(enginePtr)
{
m_ptr.m_mutex.lock();
}
explicit DrapeEngineLockGuard(DrapeEngineSafePtr & enginePtr) : m_ptr(enginePtr) { m_ptr.m_mutex.lock(); }
~DrapeEngineLockGuard()
{
m_ptr.m_mutex.unlock();
}
~DrapeEngineLockGuard() { m_ptr.m_mutex.unlock(); }
explicit operator bool() { return m_ptr.m_engine != nullptr; }