[ox] Cleanup some const_casts

This commit is contained in:
2023-12-09 00:49:03 -06:00
parent 40a3c28fbf
commit cd0958c691
2 changed files with 3 additions and 3 deletions

View File

@ -144,10 +144,10 @@ struct [[nodiscard]] Result {
constexpr Result(const Error &error) noexcept: value(), error(error) {
}
constexpr Result(const type &value, const Error &error = OxError(0)) noexcept: value(const_cast<type&>(value)), error(error) {
constexpr Result(const type &value, const Error &error = OxError(0)) noexcept: value(value), error(error) {
}
constexpr Result(type &&value, const Error &error = OxError(0)) noexcept: value(ox::forward<type>(value)), error(error) {
constexpr Result(type &&value, const Error &error = OxError(0)) noexcept: value(std::move(value)), error(error) {
}
constexpr ~Result() noexcept = default;