Skip to content

Commit

Permalink
Clean up some leftovers from Nan & Infinity checks (#1366)
Browse files Browse the repository at this point in the history
I think this was forgotten in #1289, removes 3k+ lines of comments that
are not true anymore.

---------

Co-authored-by: Andreas Gullberg Larsen <[email protected]>
  • Loading branch information
Muximize and angularsen authored Feb 23, 2024
1 parent 32fbd5d commit b4316d7
Show file tree
Hide file tree
Showing 249 changed files with 2 additions and 3,408 deletions.
4 changes: 1 addition & 3 deletions CodeGen/Generators/NanoFrameworkGen/QuantityGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public struct {_quantity.Name}
/// </summary>
/// <param name=""value"">The numeric value to construct this quantity with.</param>
/// <param name=""unit"">The unit representation to construct this quantity with.</param>
/// <exception cref=""ArgumentException"">If value is NaN or Infinity.</exception>
public {_quantity.Name}(double value, {_unitEnumName} unit)
{{
_value = value;
Expand Down Expand Up @@ -142,8 +141,7 @@ private void GenerateStaticFactoryMethods()
Writer.WL($@"
/// <summary>
/// Creates a <see cref=""{_quantity.Name}""/> from <see cref=""{_unitEnumName}.{unit.SingularName}""/>.
/// </summary>
/// <exception cref=""ArgumentException"">If value is NaN or Infinity.</exception>");
/// </summary>");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit));
Writer.WL($@"
public static {_quantity.Name} From{unit.PluralName}(double {valueParamName}) => new {_quantity.Name}({valueParamName}, {_unitEnumName}.{unit.SingularName});
Expand Down
4 changes: 1 addition & 3 deletions CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ private void GenerateInstanceConstructors()
/// </summary>
/// <param name=""value"">The numeric value to construct this quantity with.</param>
/// <param name=""unit"">The unit representation to construct this quantity with.</param>
/// <exception cref=""ArgumentException"">If value is NaN or Infinity.</exception>
public {_quantity.Name}(double value, {_unitEnumName} unit)
{{");
Writer.WL(@"
Expand Down Expand Up @@ -419,8 +418,7 @@ private void GenerateStaticFactoryMethods()
Writer.WL($@"
/// <summary>
/// Creates a <see cref=""{_quantity.Name}""/> from <see cref=""{_unitEnumName}.{unit.SingularName}""/>.
/// </summary>
/// <exception cref=""ArgumentException"">If value is NaN or Infinity.</exception>");
/// </summary>");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit));
Writer.WL($@"
public static {_quantity.Name} From{unit.PluralName}(double value)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions UnitsNet.NanoFramework/GeneratedCode/Quantities/Acceleration.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b4316d7

Please sign in to comment.