From cb7432c72aa2e52ac48cbf98c51e23f068eb3d36 Mon Sep 17 00:00:00 2001 From: gumi Date: Mon, 5 Mar 2018 10:14:47 -0500 Subject: make OMATCH use actual values instead of true/false (too lazy to just remove it completely) --- src/compat/option.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compat') diff --git a/src/compat/option.hpp b/src/compat/option.hpp index b6e7655..b462261 100644 --- a/src/compat/option.hpp +++ b/src/compat/option.hpp @@ -425,7 +425,7 @@ namespace option #define OMATCH_BEGIN(expr) \ { \ auto&& _omatch_var = (expr); \ - switch (_omatch_var.is_some()) \ + switch (_omatch_var.is_some() ? 1 : 0) \ { \ { \ { \ @@ -448,7 +448,7 @@ namespace option break; \ } \ { \ - case true: \ + case 1: \ { \ auto&& var = *_omatch_var.ptr_or(nullptr); \ /*}}}}*/ @@ -458,7 +458,7 @@ namespace option break; \ } \ { \ - case false: \ + case 0: \ { \ /*}}}}*/ } // namespace option -- cgit v1.2.3-70-g09d2