From c8c00824138ae1819250d4dd77859f5d0b811ece Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Wed, 30 Mar 2016 17:26:44 -0700 Subject: [PATCH] Fix flatbuffers conversion warnings. (from CL 116785833) Change-Id: I0fb0e1318fd70cba51e229a93f535c6639bbb331 --- include/flatbuffers/flatbuffers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index 592f71586..0b6bd1762 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -534,7 +534,7 @@ class vector_downward { inline voffset_t FieldIndexToOffset(voffset_t field_id) { // Should correspond to what EndTable() below builds up. const int fixed_fields = 2; // Vtable size and Object Size. - return (field_id + fixed_fields) * sizeof(voffset_t); + return static_cast((field_id + fixed_fields) * sizeof(voffset_t)); } // Computes how many bytes you'd have to pad to be able to write an @@ -715,7 +715,7 @@ FLATBUFFERS_FINAL_CLASS Align(sizeof(uoffset_t)); // Offset must refer to something already in buffer. assert(off && off <= GetSize()); - return GetSize() - off + sizeof(uoffset_t); + return GetSize() - off + static_cast(sizeof(uoffset_t)); } void NotNested() {