summaryrefslogtreecommitdiff
path: root/src/idl_gen_text.cpp
diff options
context:
space:
mode:
authorWouter van Oortmerssen <wvo@google.com>2014-09-04 12:22:11 -0700
committerWouter van Oortmerssen <wvo@google.com>2014-09-04 17:35:24 -0700
commit96592d5dbb72d3f455dcca845873aea7f6b45b82 (patch)
tree6d92e1a6a6729841cbde3d00d6eb684bb9ca386e /src/idl_gen_text.cpp
parent84f86be70039d41f967760350a13e4afb0f74922 (diff)
downloadflatbuffers-96592d5dbb72d3f455dcca845873aea7f6b45b82.tar.gz
flatbuffers-96592d5dbb72d3f455dcca845873aea7f6b45b82.tar.bz2
flatbuffers-96592d5dbb72d3f455dcca845873aea7f6b45b82.zip
Made Vector have a size() function, to make it more STL-alike.
Bug: 17316346 Change-Id: I52377b7fa51adccadc4e867d45666e683bc2c1ae Tested: on Linux.
Diffstat (limited to 'src/idl_gen_text.cpp')
-rw-r--r--src/idl_gen_text.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/idl_gen_text.cpp b/src/idl_gen_text.cpp
index a4e36f82..cbcd1719 100644
--- a/src/idl_gen_text.cpp
+++ b/src/idl_gen_text.cpp
@@ -70,7 +70,7 @@ template<typename T> void PrintVector(const Vector<T> &v, Type type,
std::string &text = *_text;
text += "[";
text += NewLine(opts);
- for (uoffset_t i = 0; i < v.Length(); i++) {
+ for (uoffset_t i = 0; i < v.size(); i++) {
if (i) {
text += ",";
text += NewLine(opts);
@@ -91,7 +91,7 @@ template<typename T> void PrintVector(const Vector<T> &v, Type type,
static void EscapeString(const String &s, std::string *_text) {
std::string &text = *_text;
text += "\"";
- for (uoffset_t i = 0; i < s.Length(); i++) {
+ for (uoffset_t i = 0; i < s.size(); i++) {
char c = s.Get(i);
switch (c) {
case '\n': text += "\\n"; break;