Skip to content

Commit e89a1fe

Browse files
committed
Fix default excision ratio.
1 parent ab2739f commit e89a1fe

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

ServerCodeExciser/ServerCodeExciser.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public sealed class Settings : CommandSettings
3939

4040
[CommandOption("-m|--minratio")]
4141
[Description("Specify a ratio in percent as the next argument. If the excised % of code is less than this ratio, an error will be thrown. Good to detect catastrophic changes in excision performance.")]
42-
public int? RequiredExcisionRatio { get; init; } = -1;
42+
public int RequiredExcisionRatio { get; init; } = 0;
4343

4444
[CommandOption("-t|--funcstats")]
4545
[Description("Outputs function stats instead of file stats. This is more accurate, but a lot slower, since it has to parse every file.")]
@@ -84,10 +84,7 @@ public override int Execute([NotNull] CommandContext context, [NotNull] Settings
8484
parameters.StrictMode = settings.StrictMode;
8585
parameters.UseFunctionStats = settings.UseFunctionStats;
8686
parameters.DontSkip = settings.DontSkip;
87-
if (settings.RequiredExcisionRatio.HasValue)
88-
{
89-
parameters.RequiredExcisionRatio = settings.RequiredExcisionRatio.Value / 100.0f;
90-
}
87+
parameters.RequiredExcisionRatio = settings.RequiredExcisionRatio / 100.0f;
9188

9289
if (File.Exists(settings.InputPath))
9390
{

ServerCodeExciser/ServerCodeExcisionProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class ServerCodeExcisionParameters
2222
public bool StrictMode { get; set; } = false;
2323
public bool UseFunctionStats { get; set; } = false;
2424
public bool DontSkip { get; set; } = false;
25-
public float RequiredExcisionRatio { get; set; } = -1.0f;
25+
public float RequiredExcisionRatio { get; set; } = 0.0f;
2626
public EExcisionLanguage ExcisionLanguage { get; set; } = EExcisionLanguage.Unknown;
2727
}
2828

0 commit comments

Comments
 (0)