From 225d54a5fedc1ce56703fe0f44b33dd4deb3bbf4 Mon Sep 17 00:00:00 2001 From: Jamie Madill Date: Thu, 15 Dec 2016 09:35:36 -0500 Subject: layers: PR1276, Fix Clang compiler warnings fixes - error: using namespace directive in global context in header - error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' Change-Id: If56d5b9c33f0de813fbb67120650a887eb9368b0 --- layers/parameter_validation_utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layers/parameter_validation_utils.h') diff --git a/layers/parameter_validation_utils.h b/layers/parameter_validation_utils.h index 9e999643..4e4fd812 100644 --- a/layers/parameter_validation_utils.h +++ b/layers/parameter_validation_utils.h @@ -95,14 +95,14 @@ const std::string UnsupportedResultString = "Unhandled VkResult"; const uint32_t ExtEnumBaseValue = 1000000000; template bool is_extension_added_token(T value) { - return (std::abs(static_cast(value)) >= ExtEnumBaseValue); + return (static_cast(std::abs(static_cast(value))) >= ExtEnumBaseValue); } // VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE token is a special case that was converted from a core token to an // extension added token. Its original value was intentionally preserved after the conversion, so it does not use // the base value that other extension added tokens use, and it does not fall within the enum's begin/end range. template <> bool is_extension_added_token(VkSamplerAddressMode value) { - bool result = (std::abs(static_cast(value)) >= ExtEnumBaseValue); + bool result = (static_cast(std::abs(static_cast(value))) >= ExtEnumBaseValue); return (result || (value == VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE)); } -- cgit v1.2.3