diff options
| author | Dustin Graves <dustin@lunarg.com> | 2016-04-06 11:06:19 -0600 |
|---|---|---|
| committer | Dustin Graves <dustin@lunarg.com> | 2016-04-06 12:03:51 -0600 |
| commit | 60525386aa0ffc23edf68884c572ec47c79b3970 (patch) | |
| tree | 406dd7834adc7b20c6dd7cbc5c833483e1cc1143 /layers/vk_layer_utils.cpp | |
| parent | 8cfaf1beebcfc3bfcd26d060257b3339df25972d (diff) | |
| download | usermoji-60525386aa0ffc23edf68884c572ec47c79b3970.tar.xz | |
layers: Fix MSVS value truncation warning
Changed the type of the string validation constants to from char to
uint8_t to fix warning C4309: 'initializing' : truncation of constant
value, due to an implicit unsgined char to signed char conversion.
Change-Id: I86cca4b1a8c3f818a2e7a9a7e38f05ee8cd01150
Diffstat (limited to 'layers/vk_layer_utils.cpp')
| -rw-r--r-- | layers/vk_layer_utils.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/layers/vk_layer_utils.cpp b/layers/vk_layer_utils.cpp index 21c6cd14..12df50ed 100644 --- a/layers/vk_layer_utils.cpp +++ b/layers/vk_layer_utils.cpp @@ -568,14 +568,14 @@ VkDeviceSize vk_safe_modulo(VkDeviceSize dividend, VkDeviceSize divisor) { return result; } -static const char UTF8_ONE_BYTE_CODE = 0xC0; -static const char UTF8_ONE_BYTE_MASK = 0xE0; -static const char UTF8_TWO_BYTE_CODE = 0xE0; -static const char UTF8_TWO_BYTE_MASK = 0xF0; -static const char UTF8_THREE_BYTE_CODE = 0xF0; -static const char UTF8_THREE_BYTE_MASK = 0xF8; -static const char UTF8_DATA_BYTE_CODE = 0x80; -static const char UTF8_DATA_BYTE_MASK = 0xC0; +static const uint8_t UTF8_ONE_BYTE_CODE = 0xC0; +static const uint8_t UTF8_ONE_BYTE_MASK = 0xE0; +static const uint8_t UTF8_TWO_BYTE_CODE = 0xE0; +static const uint8_t UTF8_TWO_BYTE_MASK = 0xF0; +static const uint8_t UTF8_THREE_BYTE_CODE = 0xF0; +static const uint8_t UTF8_THREE_BYTE_MASK = 0xF8; +static const uint8_t UTF8_DATA_BYTE_CODE = 0x80; +static const uint8_t UTF8_DATA_BYTE_MASK = 0xC0; VkStringErrorFlags vk_string_validate(const int max_length, const char *utf8) { VkStringErrorFlags result = VK_STRING_ERROR_NONE; |
