From: Wouter van Oortmerssen Date: Thu, 24 Jul 2014 23:58:30 +0000 (-0700) Subject: Fixed possible compile error in CreateVector* functions. X-Git-Tag: v1.0.1~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bba042d72357d80542fbda6382658f4cc9fdd8e4;p=platform%2Fupstream%2Fflatbuffers.git Fixed possible compile error in CreateVector* functions. Change-Id: I3b1fca2ea536349240b7bee35eff360f3acbb539 Tested: on Windows and Linux. --- diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index ebd0c37..5f943ba 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -597,7 +597,7 @@ class FlatBufferBuilder { } template Offset> CreateVector(const std::vector &v){ - return CreateVector(v.begin(), v.size()); + return CreateVector(v.data(), v.size()); } template Offset> CreateVectorOfStructs( @@ -610,7 +610,7 @@ class FlatBufferBuilder { template Offset> CreateVectorOfStructs( const std::vector &v) { - return CreateVectorOfStructs(v.begin(), v.size()); + return CreateVectorOfStructs(v.data(), v.size()); } // Finish serializing a buffer by writing the root offset.