1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:47:35 +00:00

Add clang-format file

Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
This commit is contained in:
Robin Burchell 2019-05-28 11:53:16 +02:00 committed by Andreas Kling
parent c11351ac50
commit 0dc9af5f7e
286 changed files with 3244 additions and 2424 deletions

View file

@ -6,27 +6,27 @@
namespace AK {
template<class T>
constexpr auto call_will_be_destroyed_if_present(T* object) -> decltype(object->will_be_destroyed(), TrueType { })
constexpr auto call_will_be_destroyed_if_present(T* object) -> decltype(object->will_be_destroyed(), TrueType {})
{
object->will_be_destroyed();
return { };
return {};
}
constexpr auto call_will_be_destroyed_if_present(...) -> FalseType
{
return { };
return {};
}
template<class T>
constexpr auto call_one_retain_left_if_present(T* object) -> decltype(object->one_retain_left(), TrueType { })
constexpr auto call_one_retain_left_if_present(T* object) -> decltype(object->one_retain_left(), TrueType {})
{
object->one_retain_left();
return { };
return {};
}
constexpr auto call_one_retain_left_if_present(...) -> FalseType
{
return { };
return {};
}
class RetainableBase {
@ -43,7 +43,7 @@ public:
}
protected:
RetainableBase() { }
RetainableBase() {}
~RetainableBase()
{
ASSERT(!m_retain_count);
@ -76,4 +76,3 @@ public:
}
using AK::Retainable;