From 608a43ba2a8626b9cc45e03156bbd3f59aea42b2 Mon Sep 17 00:00:00 2001 From: Ben Payne Date: Wed, 4 Mar 2015 18:57:08 -0500 Subject: [PATCH] Don't define String operator bool when compiling w/ clang on windows Fixes compile errors building with clang-cl, which doesn't define __GNUC__ in MS compatibility mode. --- Engine/source/core/util/str.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Engine/source/core/util/str.h b/Engine/source/core/util/str.h index 009484451..ed3848bd9 100644 --- a/Engine/source/core/util/str.h +++ b/Engine/source/core/util/str.h @@ -292,11 +292,10 @@ private: // causes an ambiguous cast compile error. Making it private is simply // more insurance that it isn't used on different compilers. // NOTE: disable on GCC since it causes hyper casting to U32 on gcc. -#ifndef TORQUE_COMPILER_GCC +#if !defined(TORQUE_COMPILER_GCC) && !defined(__clang__) operator const bool() const { return false; } #endif - static void copy(StringChar *dst, const StringChar *src, U32 size); StringData *_string;