From cedf8a446033610fd2feed842f86bfcb316e25f7 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Tue, 13 Jul 2010 23:46:57 -0300 Subject: [PATCH] silent spurious MSVC performance warning about C++ int->bool in testcase --- tests/run/cpp_nonstdint.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run/cpp_nonstdint.h b/tests/run/cpp_nonstdint.h index 480115ae..12c4960a 100644 --- a/tests/run/cpp_nonstdint.h +++ b/tests/run/cpp_nonstdint.h @@ -45,7 +45,8 @@ class Integral { private: static bool is_le() { int one = 1; - return (int)*(unsigned char *)&one; + int b = (int)*(unsigned char *)&one; + return b ? true : false; } static unsigned int lsb() { return is_le() ? 0 : N-1; -- 2.26.2