File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,10 @@ struct FileBlock {
9696 " in flatbuffer-encoded metadata" ); \
9797 }
9898
99- #define FLATBUFFERS_VECTOR_SIZE (fb_vector ) \
100- ((fb_vector == NULLPTR) ? 0 : fb_vector->size ())
99+ template <typename T>
100+ inline uint32_t FlatBuffersVectorSize (const flatbuffers::Vector<T>* vec) {
101+ return (vec == NULLPTR) ? 0 : vec->size ();
102+ }
101103
102104inline std::string StringFromFlatbuffers (const flatbuffers::String* s) {
103105 return (s == NULLPTR) ? " " : s->str ();
Original file line number Diff line number Diff line change @@ -657,11 +657,11 @@ class RecordBatchFileReader::RecordBatchFileReaderImpl {
657657 }
658658
659659 int num_dictionaries () const {
660- return FLATBUFFERS_VECTOR_SIZE ( footer_->dictionaries ());
660+ return static_cast < int >( internal::FlatBuffersVectorSize ( footer_->dictionaries () ));
661661 }
662662
663663 int num_record_batches () const {
664- return FLATBUFFERS_VECTOR_SIZE ( footer_->recordBatches ());
664+ return static_cast < int >( internal::FlatBuffersVectorSize ( footer_->recordBatches () ));
665665 }
666666
667667 MetadataVersion version () const {
You can’t perform that action at this time.
0 commit comments