Mark functions in ConstString as inline.
continuous-integration/drone/push Build is failing

This commit is contained in:
Deukhoofd committed 2020-02-26 13:01:21 +01:00
1 parent 01f1d65739
commit d08d62f3e7
2 files changed
+5 -6

No files matched your search

-1
View File
@@ -1 +0,0 @@
#include "ConstString.hpp"
+5 -5
View File
@@ -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