We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
static_assert( FLATBUFFERS_VERSION_MAJOR == 23 && FLATBUFFERS_VERSION_MINOR == 5 && FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included" );
Given this simplified schema:
table A{ field1: uint32; } table B { list : [A] (required, cpp_ptr_type:"naked"); } root_type B;
The issue is the following function, in the generated file, is written like this:
inline void B::UnPackTo ( BT *_o, const ::flatbuffers::resolver_function_t *_resolver ) const { (void)_o; (void)_resolver; { auto _e = list(); if ( _e ){ _o->list.resize( _e->size() ); for ( ::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++ ){ if ( _o->list[_i] ){ _e->Get( _i )->UnPackTo( _o->list[_i].get(), _resolver ); //here is the error : the .get() } else { _o->list[_i] = ( _e->Get( _i )->UnPack( _resolver ) ); } ; } } else { _o->list.resize( 0 ); } } }
My linter pointed the error. As you can see, _o->list[_i].get() should be _o->list[_i] because we are dealing with raw pointers.
_o->list[_i].get()
_o->list[_i]
Then it works (just tried).
Thanks
The text was updated successfully, but these errors were encountered:
Seems like a simple fix, can you file a PR?
Sorry, something went wrong.
This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.
not-stale
This issue was automatically closed due to no activity for 6 months plus the 14 day notice period.
Successfully merging a pull request may close this issue.
Hi,
Given this simplified schema:
The issue is the following function, in the generated file, is written like this:
My linter pointed the error.
As you can see,
_o->list[_i].get()
should be_o->list[_i]
because we are dealing with raw pointers.Then it works (just tried).
Thanks
The text was updated successfully, but these errors were encountered: