Skip to content

Commit f33c63d

Browse files
authored
Remove duplicate QuantityInfo constructor setters (#1020)
1 parent 1d26388 commit f33c63d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

UnitsNet/QuantityInfo.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,12 @@ public QuantityInfo([NotNull] string name, Type unitType, [NotNull] UnitInfo[] u
6565

6666
BaseDimensions = baseDimensions ?? throw new ArgumentNullException(nameof(baseDimensions));
6767
Zero = zero ?? throw new ArgumentNullException(nameof(zero));
68-
6968
Name = name ?? throw new ArgumentNullException(nameof(name));
7069
UnitType = unitType ?? throw new ArgumentNullException(nameof(unitType));
7170
UnitInfos = unitInfos ?? throw new ArgumentNullException(nameof(unitInfos));
71+
7272
BaseUnitInfo = UnitInfos.First(unitInfo => unitInfo.Value.Equals(baseUnit));
73-
Zero = zero ?? throw new ArgumentNullException(nameof(zero));
7473
ValueType = zero.GetType();
75-
BaseDimensions = baseDimensions ?? throw new ArgumentNullException(nameof(baseDimensions));
7674

7775
// Obsolete members
7876
UnitNames = UnitInfos.Select( unitInfo => unitInfo.Name ).ToArray();

0 commit comments

Comments
 (0)