diff options
Diffstat (limited to 'include/cru/base')
| -rw-r--r-- | include/cru/base/Base.h | 4 | ||||
| -rw-r--r-- | include/cru/base/SubProcess.h | 6 | ||||
| -rw-r--r-- | include/cru/base/platform/unix/EventLoop.h | 4 | ||||
| -rw-r--r-- | include/cru/base/platform/unix/PosixSpawnSubProcess.h | 3 | ||||
| -rw-r--r-- | include/cru/base/platform/win/Win32SubProcess.h | 3 |
5 files changed, 11 insertions, 9 deletions
diff --git a/include/cru/base/Base.h b/include/cru/base/Base.h index 3cd04f8c..e62054eb 100644 --- a/include/cru/base/Base.h +++ b/include/cru/base/Base.h @@ -106,10 +106,6 @@ inline void hash_combine(std::size_t& s, const T& v) { s ^= h(v) + 0x9e3779b9 + (s << 6) + (s >> 2); } -#define CRU_DEFINE_CLASS_LOG_TAG(tag) \ - private: \ - constexpr static const char* kLogTag = tag; - #ifdef _MSC_VER #pragma warning(disable : 4275) #endif diff --git a/include/cru/base/SubProcess.h b/include/cru/base/SubProcess.h index 609c4c4a..eb087c27 100644 --- a/include/cru/base/SubProcess.h +++ b/include/cru/base/SubProcess.h @@ -132,7 +132,8 @@ struct IPlatformSubProcessImpl : virtual Interface { * leak. */ class PlatformSubProcess : public Object { - CRU_DEFINE_CLASS_LOG_TAG("PlatformSubProcess") + private: + constexpr static auto kLogTag = "PlatformSubProcess"; private: struct State { @@ -210,7 +211,8 @@ class PlatformSubProcess : public Object { }; class CRU_BASE_API SubProcess { - CRU_DEFINE_CLASS_LOG_TAG("SubProcess") + private: + constexpr static auto kLogTag = "SubProcess"; public: static SubProcess Create( diff --git a/include/cru/base/platform/unix/EventLoop.h b/include/cru/base/platform/unix/EventLoop.h index 84d413fb..69a1c707 100644 --- a/include/cru/base/platform/unix/EventLoop.h +++ b/include/cru/base/platform/unix/EventLoop.h @@ -46,7 +46,9 @@ class UnixTimerFile : public Object { }; class UnixEventLoop : public Object { - CRU_DEFINE_CLASS_LOG_TAG("cru::platform::unix::UnixEventLoop") + private: + constexpr static auto kLogTag = "cru::platform::unix::UnixEventLoop"; + public: using PollEvents = decltype(std::declval<pollfd>().events); using PollRevents = decltype(std::declval<pollfd>().revents); diff --git a/include/cru/base/platform/unix/PosixSpawnSubProcess.h b/include/cru/base/platform/unix/PosixSpawnSubProcess.h index 11aa7372..f8159b10 100644 --- a/include/cru/base/platform/unix/PosixSpawnSubProcess.h +++ b/include/cru/base/platform/unix/PosixSpawnSubProcess.h @@ -16,7 +16,8 @@ namespace cru::platform::unix { class PosixSpawnSubProcessImpl : public Object, public virtual IPlatformSubProcessImpl { - CRU_DEFINE_CLASS_LOG_TAG("PosixSpawnSubProcess") + private: + constexpr static auto kLogTag = "PosixSpawnSubProcess"; public: explicit PosixSpawnSubProcessImpl(); diff --git a/include/cru/base/platform/win/Win32SubProcess.h b/include/cru/base/platform/win/Win32SubProcess.h index e7189b02..7205ef9e 100644 --- a/include/cru/base/platform/win/Win32SubProcess.h +++ b/include/cru/base/platform/win/Win32SubProcess.h @@ -13,7 +13,8 @@ namespace cru::platform::win { class CRU_BASE_API Win32SubProcessImpl : public Object, public virtual IPlatformSubProcessImpl { - CRU_DEFINE_CLASS_LOG_TAG("cru::platform::win::Win32SubProcessImpl") + private: + constexpr static auto kLogTag = "cru::platform::win::Win32SubProcessImpl"; public: explicit Win32SubProcessImpl(); |
