Skip to content

Commit dbc865f

Browse files
committed
Rename ArgumentParser constructor flag to stopOnUnknownArgs
1 parent 5ec6d87 commit dbc865f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/shared/inc/CommandLine.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,17 +307,17 @@ class ArgumentParser
307307
public:
308308
#ifdef WIN32
309309

310-
ArgumentParser(const std::wstring& CommandLine, LPCWSTR Name, int StartIndex = 1, bool IgnoreUnknownArgs = false) :
311-
m_startIndex(StartIndex), m_name(Name), m_stopUnknownArgs(IgnoreUnknownArgs)
310+
ArgumentParser(const std::wstring& CommandLine, LPCWSTR Name, int StartIndex = 1, bool stopUnknownArgs = false) :
311+
m_startIndex(StartIndex), m_name(Name), m_stopUnknownArgs(stopUnknownArgs)
312312
{
313313
m_argv.reset(CommandLineToArgvW(std::wstring(CommandLine).c_str(), &m_argc));
314314
THROW_LAST_ERROR_IF(!m_argv);
315315
}
316316

317317
#else
318318

319-
ArgumentParser(int argc, const char* const* argv, bool IgnoreUnknownArgs = false) :
320-
m_argc(argc), m_argv(argv), m_startIndex(1), m_stopUnknownArgs(IgnoreUnknownArgs)
319+
ArgumentParser(int argc, const char* const* argv, bool stopUnknownArgs = false) :
320+
m_argc(argc), m_argv(argv), m_startIndex(1), m_stopUnknownArgs(stopUnknownArgs)
321321
{
322322
}
323323

@@ -402,7 +402,7 @@ class ArgumentParser
402402
const TChar* value = nullptr;
403403
if (e.Positional)
404404
{
405-
value = m_argv[i]; // Positional arguments directly receive arvg[i]
405+
value = m_argv[i]; // Positional arguments directly receive argv[i]
406406
}
407407
else if (i + 1 < m_argc)
408408
{

src/windows/wsladiag/wsladiag.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ static int RunShellCommand(std::wstring_view commandLine)
165165
THROW_IF_WIN32_BOOL_FALSE(GetConsoleScreenBufferInfoEx(consoleOut, &infoEx));
166166

167167
WSLA_TERMINAL_CHANGED message{};
168-
message.Columns = static_cast<unsigned short>(infoEx.srWindow.Right - infoEx.srWindow.Left + 1);
169-
message.Rows = static_cast<unsigned short>(infoEx.srWindow.Bottom - infoEx.srWindow.Top + 1);
168+
message.Columns = infoEx.srWindow.Right - infoEx.srWindow.Left + 1;
169+
message.Rows = infoEx.srWindow.Bottom - infoEx.srWindow.Top + 1;
170170

171171
controlChannel.SendMessage(message);
172172
};

0 commit comments

Comments
 (0)