Skip to content

Commit

Permalink
Auto-format source code
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions Autoformatter committed Oct 30, 2023
1 parent 3d499d0 commit 64e0f6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bgen/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3451,14 +3451,14 @@ void GenerateTypeLowering (MethodInfo mi, bool null_allowed_override, out String
var nullable = TypeManager.GetUnderlyingNullableType (et);
if (nullable is not null) {
var nt = FormatType (mi.DeclaringType, nullable);
convs.AppendFormat ( $"{nt}* converted_{safe_name} = null;\n");
convs.AppendFormat ($"{nt}* converted_{safe_name} = null;\n");
convs.AppendFormat ($"{nt} converted_{safe_name}_v = default ({nt});\n");
convs.AppendFormat ($"if ({safe_name}.HasValue) {{\n");
convs.AppendFormat ($"\tconverted_{safe_name}_v = {safe_name}.Value;\n");
convs.AppendFormat ($"\tconverted_{safe_name} = &converted_{safe_name}_v;\n");
convs.AppendFormat ("}\n");
by_ref_processing.AppendFormat ($"if ({safe_name}.HasValue)").AppendLine();
by_ref_processing.AppendFormat ($"\t{safe_name} = *converted_{safe_name};").AppendLine();
by_ref_processing.AppendFormat ($"if ({safe_name}.HasValue)").AppendLine ();
by_ref_processing.AppendFormat ($"\t{safe_name} = *converted_{safe_name};").AppendLine ();
}
}
}
Expand Down

0 comments on commit 64e0f6a

Please sign in to comment.