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

@@ -1347,7 +1347,8 @@ class SwiftGenerator : public BaseGenerator {
}
void GenerateObjectAPIStructConstructor(const StructDef& struct_def) {
code_ += "{{ACCESS_TYPE}} init(_ _t: borrowing {{STRUCTNAME}}" + Mutable() + ") {";
code_ += "{{ACCESS_TYPE}} init(_ _t: borrowing {{STRUCTNAME}}" + Mutable() +
") {";
Indent();
for (auto it = struct_def.fields.vec.begin();
it != struct_def.fields.vec.end(); ++it) {
@@ -1393,8 +1394,9 @@ class SwiftGenerator : public BaseGenerator {
base_constructor);
}
code_ += "";
BuildObjectConstructor(buffer_constructor,
"_ _t: borrowing " + namer_.NamespacedType(struct_def));
BuildObjectConstructor(
buffer_constructor,
"_ _t: borrowing " + namer_.NamespacedType(struct_def));
BuildObjectConstructor(base_constructor);
if (!struct_def.fixed)
code_ +=
@@ -1960,7 +1962,7 @@ class SwiftGenerator : public BaseGenerator {
std::string GenType(const Type& type,
const bool should_consider_suffix = false) const {
return IsScalar(type.base_type) ? GenTypeBasic(type)
: IsArray(type) ? GenType(type.VectorType())
: IsArray(type) ? GenType(type.VectorType())
: GenTypePointer(type, should_consider_suffix);
}