mirror of
https://github.com/KDE/konsole.git
synced 2026-06-10 06:55:13 -04:00
Perform some initializations in initialization list
Fixes some variable is assigned in constructor body. Consider performing initialization in initialization list. (CWE-398)
This commit is contained in:
committed by
Kurt Hindenburg
parent
031ca6f72c
commit
c3176abb17
@@ -13,14 +13,13 @@
|
||||
using Konsole::ShellCommand;
|
||||
|
||||
ShellCommand::ShellCommand(const QString &aCommand)
|
||||
: _arguments(KShell::splitArgs(aCommand))
|
||||
{
|
||||
_arguments = KShell::splitArgs(aCommand);
|
||||
}
|
||||
|
||||
ShellCommand::ShellCommand(const QString &aCommand, const QStringList &aArguments)
|
||||
: _arguments(aArguments)
|
||||
{
|
||||
_arguments = aArguments;
|
||||
|
||||
if (!_arguments.isEmpty()) {
|
||||
_arguments[0] = aCommand;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user