mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
avoid zero-as-null-pointer warning (#7423)
Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -3321,7 +3321,7 @@ class CppGenerator : public BaseGenerator {
|
||||
} else if (field.native_inline) {
|
||||
code += "&" + value;
|
||||
} else {
|
||||
code += value + " ? " + value + GenPtrGet(field) + " : 0";
|
||||
code += value + " ? " + value + GenPtrGet(field) + " : nullptr";
|
||||
}
|
||||
} else {
|
||||
// _o->field ? CreateT(_fbb, _o->field.get(), _rehasher);
|
||||
|
||||
Reference in New Issue
Block a user