From 3acbe8145c60f4d1e7a180b4602a94269a489df5 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 27 Apr 2023 12:36:59 +0800 Subject: Fix most of the disabled warnings on gcc/clang (#2839) --- source/slang/slang-ast-type.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source/slang/slang-ast-type.cpp') diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp index 72f1764df..987d73994 100644 --- a/source/slang/slang-ast-type.cpp +++ b/source/slang/slang-ast-type.cpp @@ -128,9 +128,7 @@ void ErrorType::_toTextOverride(StringBuilder& out) bool ErrorType::_equalsImplOverride(Type* type) { - if (auto errorType = as(type)) - return true; - return false; + return as(type); } Type* ErrorType::_createCanonicalTypeOverride() @@ -154,9 +152,7 @@ void BottomType::_toTextOverride(StringBuilder& out) { out << toSlice("never"); bool BottomType::_equalsImplOverride(Type* type) { - if (auto bottomType = as(type)) - return true; - return false; + return as(type); } Type* BottomType::_createCanonicalTypeOverride() { return this; } -- cgit v1.2.3