Code deduplication GetQuotedString()

Moved single function GetQuotedString() to MyString

Signed-off-by: Sergey G. Brester <info@sebres.de>
Reviewed-by: Tino Reichardt <milky-7zip@mcmilk.de>
This commit is contained in:
sebres
2023-04-06 18:57:17 +02:00
committed by Tino Reichardt
parent 8cfdd747c8
commit 19e97e4c68
7 changed files with 14 additions and 37 deletions

View File

@@ -50,14 +50,6 @@ using namespace NWindows;
static NCompression::CInfo m_RegistryInfo;
extern HWND g_HWND;
UString GetQuotedString(const UString &s)
{
UString s2 ('\"');
s2 += s;
s2 += '\"';
return s2;
}
static void ErrorMessage(LPCWSTR message)
{
MessageBoxW(g_HWND, message, L"7-Zip ZS", MB_ICONERROR | MB_OK);

View File

@@ -5,8 +5,6 @@
#include "../../../Common/MyString.h"
UString GetQuotedString(const UString &s);
HRESULT CompressFiles(
const UString &arcPathPrefix,
const UString &arcName,

View File

@@ -59,17 +59,6 @@ static void ThrowException_if_Error(HRESULT res)
#endif
UString GetQuotedString(const UString &s)
{
UString s2 ('\"');
s2 += s;
s2 += '\"';
return s2;
}
static void ErrorMessage(LPCWSTR message)
{
MessageBoxW(g_HWND, message, L"7-Zip ZS", MB_ICONERROR);

View File

@@ -685,9 +685,6 @@ static bool DoItemAlwaysStart(const UString &name)
return FindExt(kStartExtensions, name);
}
UString GetQuotedString(const UString &s);
void SplitCmdLineSmart(const UString &cmd, UString &prg, UString &params);
void SplitCmdLineSmart(const UString &cmd, UString &prg, UString &params)
{