Mark functions in ConstString as inline.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
01f1d65739
commit
d08d62f3e7
|
@ -1 +0,0 @@
|
|||
#include "ConstString.hpp"
|
|
@ -20,14 +20,14 @@ namespace Arbutils {
|
|||
public:
|
||||
constexpr explicit ConstString(const char* str) : _str(str), _length(Length(str)), _hash(Hash(str)){};
|
||||
|
||||
[[nodiscard]] constexpr const char* c_str() const noexcept { return _str; }
|
||||
[[nodiscard]] std::string std_str() const { return std::string(_str, _length); }
|
||||
[[nodiscard]] inline constexpr const char* c_str() const noexcept { return _str; }
|
||||
[[nodiscard]] inline std::string std_str() const { return std::string(_str, _length); }
|
||||
|
||||
[[nodiscard]] constexpr size_t Length() const noexcept { return _length; }
|
||||
[[nodiscard]] inline constexpr size_t Length() const noexcept { return _length; }
|
||||
|
||||
[[nodiscard]] constexpr uint32_t GetHash() const noexcept { return _hash; }
|
||||
[[nodiscard]] inline constexpr uint32_t GetHash() const noexcept { return _hash; }
|
||||
};
|
||||
constexpr ConstString operator"" _const(const char* c) { return ConstString(c); }
|
||||
inline constexpr ConstString operator"" _const(const char* c) { return ConstString(c); }
|
||||
}
|
||||
|
||||
#endif // ARBUTILS_CONSTSTRING_HPP
|
||||
|
|
Loading…
Reference in New Issue