From b54ef015dee548af95d9f0ae49fb6297d45dbd58 Mon Sep 17 00:00:00 2001 From: ilobilo Date: Sun, 11 Jun 2023 21:11:32 +0400 Subject: [PATCH] remove unnecessary creation of std *_error objects remove creation and then casting to (void) of std::*_error objects if exceptions are disabled --- parallel_hashmap/phmap_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parallel_hashmap/phmap_base.h b/parallel_hashmap/phmap_base.h index 1541e35..265508c 100644 --- a/parallel_hashmap/phmap_base.h +++ b/parallel_hashmap/phmap_base.h @@ -626,7 +626,7 @@ namespace { #ifdef PHMAP_HAVE_EXCEPTIONS #define PHMAP_THROW_IMPL(e) throw e #else - #define PHMAP_THROW_IMPL(e) do { (void)(e); std::abort(); } while(0) + #define PHMAP_THROW_IMPL(...) std::abort() #endif } // namespace