Skip to content

Commit

Permalink
clean up unused param
Browse files Browse the repository at this point in the history
  • Loading branch information
radj307 committed Nov 22, 2023
1 parent d13abb0 commit 588ab74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VolumeControl/Helpers/LocalizationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static class LocalizationHelper
#region Methods

#region Initialize
public static void Initialize(bool overwriteExisting, bool logMissingTranslations, ILogWriter? log)
public static void Initialize(bool logMissingTranslations, ILogWriter? log)
{
if (IsInitialized)
throw new InvalidOperationException($"[{nameof(LocalizationHelper)}] has already been initialized!");
Expand Down
6 changes: 2 additions & 4 deletions VolumeControl/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private static int Main_Impl(string[] args)
else
{
Console.Error.WriteLine($"Failed to acquire mutex \"{appMutexName}\" because another instance of Volume Control is using it!");
LocalizationHelper.Initialize(false, false, null);
LocalizationHelper.Initialize(false, null);
MessageBox.Show(Loc.Tr($"VolumeControl.Dialogs.AnotherInstanceIsRunning.{(Settings.AllowMultipleDistinctInstances ? "MultiInstance" : "SingleInstance")}", "Another instance of Volume Control is already running!").Replace("${PATH}", Settings.Location));
return EXITCODE_MUTEX;
}
Expand Down Expand Up @@ -158,16 +158,14 @@ private static int Main_Impl(string[] args)
int versionCompare = version.CompareSortOrderTo(Settings.__VERSION__);
bool versionChanged = !versionCompare.Equals(0);

bool overwriteLanguageConfigs = args.Any(arg => arg.Equals("--overwrite-language-configs", StringComparison.Ordinal));
bool logMissingTranslations = Settings.LogMissingTranslations;
#if DEBUG
overwriteLanguageConfigs = true; //< always overwrite language configs in DEBUG configuration
logMissingTranslations = true; //< always log missing translations in DEBUG configuration
#endif

// Initialize locale helper
// overwrite language configs when the version number changed or when specified on the commandline
LocalizationHelper.Initialize(versionChanged || overwriteLanguageConfigs, logMissingTranslations, FLog.Log);
LocalizationHelper.Initialize(logMissingTranslations, FLog.Log);

if (changedWorkingDirectory)
{ // write a log message about changing the working directory
Expand Down

0 comments on commit 588ab74

Please sign in to comment.