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

@@ -12,47 +12,26 @@ class JsonHandle
void DecRef();
public:
JsonHandle(json_t * pJson = 0) : m_pJson(pJson)
{
IncRef();
}
JsonHandle(json_t * pJson = 0) : m_pJson(pJson) { IncRef(); }
JsonHandle(JsonHandle const & json) : m_pJson(json.m_pJson)
{
IncRef();
}
JsonHandle(JsonHandle const & json) : m_pJson(json.m_pJson) { IncRef(); }
~JsonHandle()
{
DecRef();
}
~JsonHandle() { DecRef(); }
JsonHandle & operator = (JsonHandle const & json)
JsonHandle & operator=(JsonHandle const & json)
{
JsonHandle tmp(json);
tmp.swap(*this);
return *this;
}
void swap(JsonHandle & json)
{
std::swap(m_pJson, json.m_pJson);
}
void swap(JsonHandle & json) { std::swap(m_pJson, json.m_pJson); }
json_t * get() const
{
return m_pJson;
}
json_t * get() const { return m_pJson; }
json_t * operator -> () const
{
return m_pJson;
}
json_t * operator->() const { return m_pJson; }
operator bool () const
{
return m_pJson != 0;
}
operator bool() const { return m_pJson != 0; }
/// Attach newly created object without incrementing ref count (it's already == 1).
void AttachNew(json_t * pJson)