Skip to content

Commit

Permalink
Merge pull request #4 from cdanek/cdanek-patch-4
Browse files Browse the repository at this point in the history
Update WeightedList.cs
  • Loading branch information
cdanek authored Jun 8, 2022
2 parents d17198c + ff2edce commit 3d32c44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WeightedList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void AddWeightToAll(int weight)
public void SetWeightOfAll(int weight)
{
if (weight <= 0 && BadWeightErrorHandling == ThrowExceptionOnAdd)
throw new ArgumentException($"Cannot set weight to <1.");
throw new ArgumentException($"Weight cannot be non-positive.");
for (int i = 0; i < Count; i++) _weights[i] = FixWeight(weight);
Recalculate();
}
Expand Down

0 comments on commit 3d32c44

Please sign in to comment.