From a6adac83c6aadbacf2a338d2e55148f7d3417762 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 2 Nov 2017 19:27:08 +0000 Subject: Remove some C-style const char* casts. Change-Id: I4785dd277b9da072ee3c55e2aaeb688bbf02852e Reviewed-on: https://pdfium-review.googlesource.com/17391 Reviewed-by: dsinclair Commit-Queue: Lei Zhang --- testing/test_support.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'testing') diff --git a/testing/test_support.h b/testing/test_support.h index 7525c10b36..ec4b4aeacb 100644 --- a/testing/test_support.h +++ b/testing/test_support.h @@ -19,33 +19,34 @@ namespace pdfium { -#define STR_IN_TEST_CASE(input_literal, ...) \ - { \ - (const unsigned char*) input_literal, sizeof(input_literal) - 1, \ - __VA_ARGS__ \ +#define STR_IN_TEST_CASE(input_literal, ...) \ + { \ + reinterpret_cast(input_literal), \ + sizeof(input_literal) - 1, __VA_ARGS__ \ } -#define STR_IN_OUT_CASE(input_literal, expected_literal, ...) \ - { \ - (const unsigned char*) input_literal, sizeof(input_literal) - 1, \ - (const unsigned char*)expected_literal, sizeof(expected_literal) - 1, \ - __VA_ARGS__ \ +#define STR_IN_OUT_CASE(input_literal, expected_literal, ...) \ + { \ + reinterpret_cast(input_literal), \ + sizeof(input_literal) - 1, \ + reinterpret_cast(expected_literal), \ + sizeof(expected_literal) - 1, __VA_ARGS__ \ } struct StrFuncTestData { const unsigned char* input; - unsigned int input_size; + uint32_t input_size; const unsigned char* expected; - unsigned int expected_size; + uint32_t expected_size; }; struct DecodeTestData { const unsigned char* input; - unsigned int input_size; + uint32_t input_size; const unsigned char* expected; - unsigned int expected_size; + uint32_t expected_size; // The size of input string being processed. - unsigned int processed_size; + uint32_t processed_size; }; struct NullTermWstrFuncTestData { -- cgit v1.2.3