From ae22321648f7b05f998ab905e0e892d5bb57f34c Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 25 Feb 2023 16:22:11 +0100 Subject: [PATCH] Option, Result: Make try_move_value() non-const since it modifies the Option --- luna/include/luna/Option.h | 2 +- luna/include/luna/Result.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/luna/include/luna/Option.h b/luna/include/luna/Option.h index ce5a57dd..70266c0f 100644 --- a/luna/include/luna/Option.h +++ b/luna/include/luna/Option.h @@ -101,7 +101,7 @@ template class Option return true; } - bool try_move_value(T& ref) const + bool try_move_value(T& ref) { if (!has_value()) return false; m_has_value = false; diff --git a/luna/include/luna/Result.h b/luna/include/luna/Result.h index 8fd56785..9f833b8e 100644 --- a/luna/include/luna/Result.h +++ b/luna/include/luna/Result.h @@ -110,7 +110,7 @@ template class Result return m_value.try_set_value(ref); } - bool try_move_value(T& ref) const + bool try_move_value(T& ref) { return m_value.try_move_value(ref); }