Skip to content

Commit

Permalink
Merge pull request #41 from Cysharp/hadashiA/nullable-enable
Browse files Browse the repository at this point in the history
Make generated code  `#nullable enable`
  • Loading branch information
neuecc authored Feb 2, 2024
2 parents 70df6da + 8dde2e5 commit ad13a7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY UnitGenerator. DO NOT CHANGE IT.
// </auto-generated>
#pragma warning disable CS8669
#pragma warning disable CS8625
#nullable enable
using System;
#if NET7_0_OR_GREATER
using System.Numerics;
Expand All @@ -16,7 +15,7 @@ internal class UnitOfAttribute : Attribute
public Type Type { get; }
public UnitGenerateOptions Options { get; }
public UnitArithmeticOperators ArithmeticOperators { get; set; } = UnitArithmeticOperators.All;
public string ToStringFormat { get; set; }
public string? ToStringFormat { get; set; }

public UnitOfAttribute(Type type, UnitGenerateOptions options = UnitGenerateOptions.None)
{
Expand Down
5 changes: 2 additions & 3 deletions src/UnitGenerator/SourceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ private void SetDefaultAttribute(GeneratorPostInitializationContext context)
// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY UnitGenerator. DO NOT CHANGE IT.
// </auto-generated>
#pragma warning disable CS8669
#pragma warning disable CS8625
#nullable enable
using System;
#if NET7_0_OR_GREATER
using System.Numerics;
Expand All @@ -138,7 +137,7 @@ internal class UnitOfAttribute : Attribute
public Type Type { get; }
public UnitGenerateOptions Options { get; }
public UnitArithmeticOperators ArithmeticOperators { get; set; } = UnitArithmeticOperators.All;
public string ToStringFormat { get; set; }
public string? ToStringFormat { get; set; }
public UnitOfAttribute(Type type, UnitGenerateOptions options = UnitGenerateOptions.None)
{
Expand Down

0 comments on commit ad13a7c

Please sign in to comment.