fixed vstudio analyzer warnings

This commit is contained in:
silverqx
2022-07-16 19:39:14 +02:00
parent b4332775c2
commit a6b52ed151
7 changed files with 18 additions and 12 deletions
+2 -3
View File
@@ -367,9 +367,8 @@ int CompleteCommand::printEnvironmentNames(const QString &environmentName) const
if (environment.startsWith(environmentName))
environmentNames
<< QStringLiteral("%1;%2").arg(
NOSPACE.arg(LongOption.arg(Env).append(EQ_C),
environment),
std::move(environment));
NOSPACE.arg(LongOption.arg(Env).append(EQ_C), environment),
environment);
// Print
note(environmentNames.join(NEWLINE));
+4 -4
View File
@@ -116,8 +116,8 @@ namespace
if (!pwshProfileFile.open(openMode))
throw Exceptions::RuntimeError(
QStringLiteral("Can not open '%1' file in openPwshProfileFile().")
.arg(QStringLiteral("%1/%2").arg(std::move(pwshProfileFolder),
std::move(profileFileRelative))));
.arg(QStringLiteral("%1/%2").arg(pwshProfileFolder,
profileFileRelative)));
}
/*! Detect whether PowerShell profile folder already exists and create it
@@ -137,8 +137,8 @@ namespace
throw Exceptions::RuntimeError(
QStringLiteral("Can not create '%1' directory "
"in preparePowerShellFolder().")
.arg(QStringLiteral("%1/%2").arg(std::move(documentsFolder),
std::move(powershellFolder))));
.arg(QStringLiteral("%1/%2").arg(documentsFolder,
powershellFolder)));
}
/*! Template string for tab-completion installed successfully. */
+1 -1
View File
@@ -232,7 +232,7 @@ void Terminal::enableUtf8ConsoleEncoding()
unicode to utf8, eg. by QString::fromStdWString(), WideCharToMultiByte(), or
std::codecvt(). It also works with msys2 ucrt64 gcc/clang. */
SetConsoleCP(CP_UTF8);
_setmode(_fileno(stdin), _O_WTEXT);
std::ignore = _setmode(_fileno(stdin), _O_WTEXT); // std::ignore to suppress C6031
}
#endif