Silenced some weird (very likely false-positive) clang-tidy warnings.

This commit is contained in:
2024-08-18 12:24:37 +02:00
parent 66e319fb0d
commit d73fa25ed8
2 changed files with 3 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ struct OptionalStorage
std::uint8_t used = 0;
[[nodiscard]]
constexpr bool empty() const noexcept { return !used; }
constexpr bool empty() const noexcept { return !used; } // NOLINT(clang-analyzer-core.uninitialized.UndefReturn)
template<typename... TArgs>
constexpr void emplace(TArgs&&... args) noexcept
@@ -111,7 +111,7 @@ template<typename TValue>
class Optional
{
private:
impl::OptionalStorage<TValue> storage_;
impl::OptionalStorage<TValue> storage_ = {};
public:
constexpr Optional() = default;
constexpr Optional(NullOptional) noexcept {}