From 2dafab9662fe759a442a7ef11ead0bf5885b433f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 27 Oct 2018 13:46:12 +0800 Subject: [PATCH] 1 --- cpp/utils.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpp/utils.cc b/cpp/utils.cc index 7f55a23..0862657 100644 --- a/cpp/utils.cc +++ b/cpp/utils.cc @@ -24,6 +24,9 @@ bool ReadCsvMetaFile(const std::string& filename, for (int i = 0; i < descriptor->field_count(); ++i) { const google::protobuf::FieldDescriptor* field_desc = descriptor->field(i); const std::string& field_name = field_desc->name(); + if (field_name.empty() || field_name[0] == '_') { + continue; + } switch (field_desc->cpp_type()) { case google::protobuf::FieldDescriptor::CPPTYPE_STRING: