From 2c03a4a5df73b09914ca5a5591b1656c1aa82794 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Wed, 28 Dec 2022 08:56:54 -0600 Subject: [PATCH] chore(ref): clean up includes --- common/Ref.hpp | 1 + common/ref/TRefCnt.hpp | 11 ++--------- common/ref/TRefCntPtr.hpp | 13 +++++++++++++ common/string/RCString.hpp | 2 +- 4 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 common/ref/TRefCntPtr.hpp diff --git a/common/Ref.hpp b/common/Ref.hpp index b627c8e..6733fc9 100644 --- a/common/Ref.hpp +++ b/common/Ref.hpp @@ -2,5 +2,6 @@ #define COMMON_REF_HPP #include "common/ref/TRefCnt.hpp" +#include "common/ref/TRefCntPtr.hpp" #endif diff --git a/common/ref/TRefCnt.hpp b/common/ref/TRefCnt.hpp index 74a3eb4..5dbbac0 100644 --- a/common/ref/TRefCnt.hpp +++ b/common/ref/TRefCnt.hpp @@ -1,5 +1,5 @@ -#ifndef COMMON_T_REF_CNT_HPP -#define COMMON_T_REF_CNT_HPP +#ifndef COMMON_REF_T_REF_CNT_HPP +#define COMMON_REF_T_REF_CNT_HPP #include @@ -9,11 +9,4 @@ class TRefCnt { uint32_t m_refcnt; }; -template -class TRefCntPtr { - public: - // Member variables - T* m_ptr; -}; - #endif diff --git a/common/ref/TRefCntPtr.hpp b/common/ref/TRefCntPtr.hpp new file mode 100644 index 0000000..49174db --- /dev/null +++ b/common/ref/TRefCntPtr.hpp @@ -0,0 +1,13 @@ +#ifndef COMMON_REF_T_REF_CNT_PTR_HPP +#define COMMON_REF_T_REF_CNT_PTR_HPP + +#include + +template +class TRefCntPtr { + public: + // Member variables + T* m_ptr; +}; + +#endif diff --git a/common/string/RCString.hpp b/common/string/RCString.hpp index c4b3beb..dbe2510 100644 --- a/common/string/RCString.hpp +++ b/common/string/RCString.hpp @@ -1,7 +1,7 @@ #ifndef COMMON_STRING_RC_STRING_HPP #define COMMON_STRING_RC_STRING_HPP -#include "common/ref/TRefCnt.hpp" +#include "common/Ref.hpp" #include class RCString : public TRefCnt {