From 47b327bbf76d3624bfa18c38b901d5623b015844 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 31 Dec 2023 14:34:19 +0100 Subject: [PATCH] Small tweaks to some of the copyright headers. --- sfw/object/object.h | 6 ++++-- sfw/object/reference.cpp | 5 +++++ sfw/object/reference.h | 9 +++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sfw/object/object.h b/sfw/object/object.h index 289852d..dda195e 100644 --- a/sfw/object/object.h +++ b/sfw/object/object.h @@ -4,9 +4,11 @@ #include "ustring.h" #include "vector.h" -class Database; +/*************************************************************************/ +/* object.h */ +/* From https://github.com/Relintai/pandemonium_engine (MIT) */ +/*************************************************************************/ -//taken from GodotEngine's object.h #define SFW_OBJECT(m_class, m_inherits) \ private: \ void operator=(const m_class &p_rval) {} \ diff --git a/sfw/object/reference.cpp b/sfw/object/reference.cpp index 8de3642..733bd0f 100644 --- a/sfw/object/reference.cpp +++ b/sfw/object/reference.cpp @@ -1,5 +1,10 @@ #include "reference.h" +/*************************************************************************/ +/* reference.cpp */ +/* From https://github.com/Relintai/pandemonium_engine (MIT) */ +/*************************************************************************/ + bool Reference::init_ref() { if (reference()) { if (!is_referenced() && refcount_init.unref()) { diff --git a/sfw/object/reference.h b/sfw/object/reference.h index 369a6cd..f132eb1 100644 --- a/sfw/object/reference.h +++ b/sfw/object/reference.h @@ -1,9 +1,10 @@ #ifndef REFERENCE_H #define REFERENCE_H -// Most of the code is from the godot engine's reference.h -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/*************************************************************************/ +/* reference.h */ +/* From https://github.com/Relintai/pandemonium_engine (MIT) */ +/*************************************************************************/ #include "memory.h" #include "object.h" @@ -13,7 +14,7 @@ class Reference : public Object { SFW_OBJECT(Reference, Object); public: - /*_FORCE_INLINE_*/ bool is_referenced() const { return refcount_init.get() != 1; } + _FORCE_INLINE_ bool is_referenced() const { return refcount_init.get() != 1; } bool init_ref(); bool reference(); // returns false if refcount is at zero and didn't get increased bool unreference();