Merge pull request #293 from wheremyfoodat/res

Result: Initialize m_value to 0 in default HorizonResult constructor
This commit is contained in:
wheremyfoodat 2023-09-27 16:41:45 +03:00 committed by GitHub
commit 49368e0db6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -157,7 +157,7 @@ namespace Result {
}
public:
constexpr HorizonResult() {}
constexpr HorizonResult() : m_value(0) {}
constexpr HorizonResult(uint32_t value) : m_value(value) {}
constexpr HorizonResult(uint32_t description, HorizonResultModule module, HorizonResultSummary summary, HorizonResultLevel level) : m_value(makeValue(description, static_cast<uint32_t>(module), static_cast<uint32_t>(summary), static_cast<uint32_t>(level))) {}
constexpr operator uint32_t() const { return m_value; }