diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2023-02-13 12:08:09 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2023-02-23 14:30:03 +0000 |
commit | 149d755467d8cbd15311117c53c38863b01e453a (patch) | |
tree | 74d01e76859c6858d911afb00b09634f9b4d83b4 | |
parent | d91ee33f2940ada07ac305121ec75d0a69f376c7 (diff) |
Add default function argument in favor of function overload
Change-Id: I87ca67757930bddbfd2a56f5dc38ce7780c1018c
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
-rw-r--r-- | QtVsTools.Core/CxxStreamReader.cs | 7 | ||||
-rw-r--r-- | QtVsTools.Core/OutputWindowPane.cs | 7 |
2 files changed, 2 insertions, 12 deletions
diff --git a/QtVsTools.Core/CxxStreamReader.cs b/QtVsTools.Core/CxxStreamReader.cs index f383ad13..eff4bb74 100644 --- a/QtVsTools.Core/CxxStreamReader.cs +++ b/QtVsTools.Core/CxxStreamReader.cs @@ -86,12 +86,7 @@ namespace QtVsTools.Core disposed = true; } - public string ReadLine() - { - return ReadLine(false); - } - - public string ReadLine(bool removeStrings) + public string ReadLine(bool removeStrings = false) { var line = string.Empty; if (sr != null) { diff --git a/QtVsTools.Core/OutputWindowPane.cs b/QtVsTools.Core/OutputWindowPane.cs index 187a561c..57b11182 100644 --- a/QtVsTools.Core/OutputWindowPane.cs +++ b/QtVsTools.Core/OutputWindowPane.cs @@ -163,12 +163,7 @@ namespace QtVsTools.Core ThreadHelper.JoinableTaskFactory.Run(async () => { await PrintAsync(value); }); } - public Task PrintAsync() - { - return PrintAsync(""); - } - - public async Task PrintAsync(string value) + public async Task PrintAsync(string value = "") { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); if (Pane is IVsOutputWindowPaneNoPump noPumpPane) |