aboutsummaryrefslogtreecommitdiffstats
path: root/al/eax_fx_slot_index.h
diff options
context:
space:
mode:
Diffstat (limited to 'al/eax_fx_slot_index.h')
-rw-r--r--al/eax_fx_slot_index.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/al/eax_fx_slot_index.h b/al/eax_fx_slot_index.h
index 2913ee8d..e1e5475a 100644
--- a/al/eax_fx_slot_index.h
+++ b/al/eax_fx_slot_index.h
@@ -10,7 +10,6 @@
using EaxFxSlotIndexValue = std::size_t;
-
class EaxFxSlotIndex : public al::optional<EaxFxSlotIndexValue>
{
public:
@@ -27,12 +26,16 @@ private:
static void fail(const char *message);
}; // EaxFxSlotIndex
-bool operator==(
- const EaxFxSlotIndex& lhs,
- const EaxFxSlotIndex& rhs) noexcept;
-
-bool operator!=(
- const EaxFxSlotIndex& lhs,
- const EaxFxSlotIndex& rhs) noexcept;
+inline bool operator==(const EaxFxSlotIndex& lhs, const EaxFxSlotIndex& rhs) noexcept
+{
+ if(lhs.has_value() != rhs.has_value())
+ return false;
+ if(lhs.has_value())
+ return *lhs == *rhs;
+ return true;
+}
+
+inline bool operator!=(const EaxFxSlotIndex& lhs, const EaxFxSlotIndex& rhs) noexcept
+{ return !(lhs == rhs); }
#endif // !EAX_FX_SLOT_INDEX_INCLUDED