diff --git a/src/objects/instance-type-inl.h b/src/objects/instance-type-inl.h index 2a15175eb5..4bae7442e3 100644 --- a/src/objects/instance-type-inl.h +++ b/src/objects/instance-type-inl.h @@ -52,16 +52,13 @@ UNIQUE_INSTANCE_TYPE_MAP_LIST_GENERATOR(INSTANCE_TYPE_MAP, _) inline constexpr base::Optional UniqueMapOfInstanceType( InstanceType type) { - switch (type) { #define INSTANCE_TYPE_CHECK(it, forinstancetype) \ - case forinstancetype: \ + if (type == forinstancetype) { \ return InstanceTypeChecker::UniqueMapOfInstanceType< \ InstanceTypeChecker::InstanceTypeTraits::it>(); \ - INSTANCE_TYPE_CHECKERS_SINGLE(INSTANCE_TYPE_CHECK); -#undef INSTANCE_TYPE_CHECK - default: { - } } + INSTANCE_TYPE_CHECKERS_SINGLE(INSTANCE_TYPE_CHECK); +#undef INSTANCE_TYPE_CHECK return {}; }