From e850f728bce75cf05e2938f2d22bee88ef4905a7 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Thu, 16 Apr 2020 11:16:55 +0200 Subject: [PATCH] Add constexpr to GetValue on ConstString holder. --- src/ConstString.hpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/ConstString.hpp b/src/ConstString.hpp index 10d2cae..12121a3 100644 --- a/src/ConstString.hpp +++ b/src/ConstString.hpp @@ -20,17 +20,13 @@ namespace Arbutils { ~__ConstStringCharHolder() { delete[] _value; } - inline void RemoveReference(){ - if (--_references == 0){ + inline void RemoveReference() { + if (--_references == 0) { delete this; } } - inline void AddReference(){ - _references++; - } - inline const char* GetValue(){ - return _value; - } + inline void AddReference() { _references++; } + inline constexpr const char* GetValue() const { return _value; } }; }