From 210a1ab969a33165717e5f12575a8c344c117230 Mon Sep 17 00:00:00 2001 From: Stephen Lane-Walsh Date: Fri, 16 Jun 2017 12:53:53 -0400 Subject: [PATCH] Fixed build error in Visual Studio 2017 (#4353) flatbuffers.h(591): error C2220: warning treated as error - no 'object' file generated flatbuffers.h(591): warning C4267: 'return': conversion from 'size_t' to 'flatbuffers::uoffset_t', possible loss of data --- include/flatbuffers/flatbuffers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index b94846686..2f4e3cf15 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -587,7 +587,7 @@ class vector_downward { return static_cast(reserved_ - (cur_ - buf_)); } - uoffset_t capacity() const { + size_t capacity() const { return reserved_; }