Style fixes.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-06-26 15:58:42 +02:00
parent abca51d331
commit 088f66c385
5 changed files with 5 additions and 8 deletions

View File

@@ -9,8 +9,8 @@ namespace ArbUt {
uint32_t _hash;
constexpr BasicStringView(size_t length, uint32_t hash) : _length(length), _hash(hash) {}
public:
public:
[[nodiscard]] inline constexpr size_t Length() const noexcept { return _length; }
[[nodiscard]] inline constexpr uint32_t GetHash() const noexcept { return _hash; }
[[nodiscard]] inline constexpr std::size_t operator()(BasicStringView const& s) const noexcept { return _hash; }
@@ -28,7 +28,6 @@ namespace ArbUt {
virtual constexpr bool operator!=(const std::string_view& rhs) const noexcept = 0;
virtual constexpr bool operator==(const char* rhs) const noexcept = 0;
virtual constexpr bool operator!=(const char* rhs) const noexcept = 0;
};
}

View File

@@ -92,7 +92,9 @@ namespace ArbUt {
inline constexpr bool operator!=(const char* rhs) const noexcept override { return _hash != Hash(rhs); }
inline static constexpr uint32_t CalculateHash(const char* val) noexcept { return Hash(val); }
inline static constexpr uint32_t CalculateHash(const std::string_view& val) noexcept { return Hash(val.data()); }
inline static constexpr uint32_t CalculateHash(const std::string_view& val) noexcept {
return Hash(val.data());
}
};
}