Skip to content

Commit 56b7216

Browse files
committed
Fix Tencent#949 about -Werror=conversion
1 parent f8eb7ba commit 56b7216

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/unittest/pointertest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ TEST(Pointer, Stringify) {
441441
}
442442

443443
// Construct a Pointer with static tokens, no dynamic allocation involved.
444-
#define NAME(s) { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex }
445-
#define INDEX(i) { #i, sizeof(#i) - 1, i }
444+
#define NAME(s) { s, static_cast<SizeType>(sizeof(s) / sizeof(s[0]) - 1), kPointerInvalidIndex }
445+
#define INDEX(i) { #i, static_cast<SizeType>(sizeof(#i) - 1), i }
446446

447447
static const Pointer::Token kTokens[] = { NAME("foo"), INDEX(0) }; // equivalent to "/foo/0"
448448

0 commit comments

Comments
 (0)