Run clang-format -i **/*.cpp (#8865)

This commit is contained in:
Derek Bailey
2025-12-19 10:42:57 -08:00
committed by GitHub
parent d9fde67eb5
commit fb55e0c9de
24 changed files with 213 additions and 192 deletions

View File

@@ -42,8 +42,8 @@ class Array {
// If T is a non-pointer and a LE-scalar or a struct (!scalar_tag::value).
static FLATBUFFERS_CONSTEXPR bool is_span_observable =
!std::is_pointer<T>::value &&
((scalar_tag::value && (FLATBUFFERS_LITTLEENDIAN || sizeof(T) == 1)) ||
!scalar_tag::value);
((scalar_tag::value && (FLATBUFFERS_LITTLEENDIAN || sizeof(T) == 1)) ||
!scalar_tag::value);
FLATBUFFERS_CONSTEXPR uint16_t size() const { return length; }

View File

@@ -469,8 +469,9 @@ class FlatBufferBuilderImpl {
if (dedup_vtables_) {
for (auto it = buf_.scratch_data(); it < buf_.scratch_end();
it += sizeof(uoffset_t)) {
auto vt_offset_ptr = reinterpret_cast<uoffset_t *>(it);
auto vt2 = reinterpret_cast<voffset_t *>(buf_.data_at(*vt_offset_ptr + length_of_64_bit_region_));
auto vt_offset_ptr = reinterpret_cast<uoffset_t*>(it);
auto vt2 = reinterpret_cast<voffset_t*>(
buf_.data_at(*vt_offset_ptr + length_of_64_bit_region_));
auto vt2_size = ReadScalar<voffset_t>(vt2);
if (vt1_size != vt2_size || 0 != memcmp(vt2, vt1, vt1_size)) continue;
vt_use = *vt_offset_ptr;

View File

@@ -410,7 +410,6 @@ FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<const U> make_structs_span(
#endif
// Represent a vector much like the template above, but in this case we
// don't know what the element types are (used with reflection.h).
class VectorOfAny {