From 07d6074b5deadc7ff6d30d5fb47fb6fa863a14ff Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Mon, 29 Apr 2024 09:50:57 +0200 Subject: All headers reformatted with updated clang-format settings --- src/linda.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/linda.h') diff --git a/src/linda.h b/src/linda.h index 21b6ecc..dbf48b3 100644 --- a/src/linda.h +++ b/src/linda.h @@ -20,10 +20,10 @@ static constexpr UniqueKey kLindaBatched{ 0xB8234DF772646567ull, "linda.batched" using LindaGroup = Unique; -class Linda : public DeepPrelude // Deep userdata MUST start with this header +class Linda +: public DeepPrelude // Deep userdata MUST start with this header { private: - static constexpr size_t kEmbeddedNameLength = 24; using EmbeddedName = std::array; struct AllocatedName @@ -35,7 +35,6 @@ class Linda : public DeepPrelude // Deep userdata MUST start with this header std::variant m_name; public: - std::condition_variable m_read_happened; std::condition_variable m_write_happened; Universe* const U{ nullptr }; // the universe this linda belongs to @@ -43,7 +42,6 @@ class Linda : public DeepPrelude // Deep userdata MUST start with this header CancelRequest simulate_cancel{ CancelRequest::None }; public: - // a fifo full userdata has one uservalue, the table that holds the actual fifo contents [[nodiscard]] static void* operator new(size_t size_, Universe* U_) noexcept { return U_->internal_allocator.alloc(size_); } // always embedded somewhere else or "in-place constructed" as a full userdata @@ -61,14 +59,12 @@ class Linda : public DeepPrelude // Deep userdata MUST start with this header Linda& operator=(Linda const&) = delete; Linda& operator=(Linda const&&) = delete; - static int ProtectedCall(lua_State* L, lua_CFunction f_); - - private : + [[nodiscard]] static int ProtectedCall(lua_State* L, lua_CFunction f_); + private: void setName(char const* name_, size_t len_); public: - [[nodiscard]] char const* getName() const; [[nodiscard]] Keeper* whichKeeper() const { return U->keepers->nb_keepers ? &U->keepers->keeper_array[m_keeper_index] : nullptr; } [[nodiscard]] Keeper* acquireKeeper() const; -- cgit v1.2.3-55-g6feb