diff options
| author | Jamie Madill <jmadill@chromium.org> | 2016-12-15 09:35:36 -0500 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-12-15 11:17:11 -0700 |
| commit | 225d54a5fedc1ce56703fe0f44b33dd4deb3bbf4 (patch) | |
| tree | 190972273a56a849f510a5812caac017706082d2 /layers/parameter_validation_utils.h | |
| parent | 8b896c16e3013b5a5130d9b5e8a80dfe4e5c3c9c (diff) | |
| download | usermoji-225d54a5fedc1ce56703fe0f44b33dd4deb3bbf4.tar.xz | |
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
Diffstat (limited to 'layers/parameter_validation_utils.h')
| -rw-r--r-- | layers/parameter_validation_utils.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 <typename T> bool is_extension_added_token(T value) { - return (std::abs(static_cast<int32_t>(value)) >= ExtEnumBaseValue); + return (static_cast<uint32_t>(std::abs(static_cast<int32_t>(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<int32_t>(value)) >= ExtEnumBaseValue); + bool result = (static_cast<uint32_t>(std::abs(static_cast<int32_t>(value))) >= ExtEnumBaseValue); return (result || (value == VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE)); } |
