Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed CostAttribute multiplier path signature. #6777

Merged
merged 4 commits into from
Dec 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public CostAttribute(int complexity)

public CostAttribute(
int complexity,
params MultiplierPathString[] multipliers)
params string[] multipliers)
{
if (complexity <= 0)
{
Expand All @@ -56,13 +56,13 @@ public CostAttribute(
}

_complexity = complexity;
_multipliers = multipliers.Where(t => t.HasValue).ToArray();
_multipliers = multipliers.Select(t => new MultiplierPathString(t)).Where(t => t.HasValue).ToArray();
}

public CostAttribute(
int complexity,
int defaultMultiplier,
params MultiplierPathString[] multipliers)
params string[] multipliers)
{
if (complexity <= 0)
{
Expand All @@ -87,7 +87,7 @@ public CostAttribute(

_complexity = complexity;
_defaultMultiplier = defaultMultiplier;
_multipliers = multipliers.Where(t => t.HasValue).ToArray();
_multipliers = multipliers.Select(t => new MultiplierPathString(t)).Where(t => t.HasValue).ToArray();
}

protected override void OnConfigure(
Expand Down
Loading