https://git.reactos.org/?p=reactos.git;a=commitdiff;h=26ac8ac81e875db08c306…
commit 26ac8ac81e875db08c306d95a0c7175323e84a69
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Feb 3 23:40:58 2018 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Feb 3 23:43:53 2018 +0100
[RAPPS] Remove deprecated TODO; use _countof() where needed.
---
base/applications/rapps/gui.cpp | 1 -
base/applications/rapps/loaddlg.cpp | 2 +-
base/applications/rapps/misc.cpp | 2 +-
base/applications/rapps/splitter.cpp | 2 --
base/applications/rapps/unattended.cpp | 2 +-
5 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/base/applications/rapps/gui.cpp b/base/applications/rapps/gui.cpp
index 4118acbca5..cae703f9a9 100644
--- a/base/applications/rapps/gui.cpp
+++ b/base/applications/rapps/gui.cpp
@@ -145,7 +145,6 @@ class CAvailableAppView
szLoadedAInfoText.LoadStringW(IDS_AINFO_LANGUAGES);
- //TODO: replace those hardcoded strings
if (Info->HasNativeLanguage())
{
szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_AVAILABLE_TRANSLATION);
diff --git a/base/applications/rapps/loaddlg.cpp b/base/applications/rapps/loaddlg.cpp
index 155241bc82..ba3e714012 100644
--- a/base/applications/rapps/loaddlg.cpp
+++ b/base/applications/rapps/loaddlg.cpp
@@ -444,7 +444,7 @@ INT_PTR CALLBACK CDownloadManager::DownloadDlgProc(HWND Dlg, UINT
uMsg, WPARAM w
DownloadsListView.LoadList(AppsToInstallList);
// Get a dlg string for later use
- GetWindowTextW(Dlg, szCaption, MAX_PATH);
+ GetWindowTextW(Dlg, szCaption, _countof(szCaption));
// Hide a placeholder from displaying
szTempCaption = szCaption;
diff --git a/base/applications/rapps/misc.cpp b/base/applications/rapps/misc.cpp
index b1c2938b6b..afd134899c 100644
--- a/base/applications/rapps/misc.cpp
+++ b/base/applications/rapps/misc.cpp
@@ -225,7 +225,7 @@ BOOL ExtractFilesFromCab(LPCWSTR lpCabName, LPCWSTR lpOutputPath)
ZeroMemory(&Dest, sizeof(Dest));
WideCharToMultiByte(CP_ACP, 0, lpOutputPath, -1, Dest.Destination, MAX_PATH,
NULL, NULL);
- WideCharToMultiByte(CP_ACP, 0, lpCabName, -1, szCabName, MAX_PATH, NULL,
NULL);
+ WideCharToMultiByte(CP_ACP, 0, lpCabName, -1, szCabName, _countof(szCabName),
NULL, NULL);
Dest.Operation = EXTRACT_FILLFILELIST;
Result = pfnExtract(&Dest, szCabName);
diff --git a/base/applications/rapps/splitter.cpp b/base/applications/rapps/splitter.cpp
index edf44cea4b..d1f1bb0080 100644
--- a/base/applications/rapps/splitter.cpp
+++ b/base/applications/rapps/splitter.cpp
@@ -147,7 +147,6 @@ CreateHSplitBar(HWND hwnd)
hInst,
NULL);
-
if (hHSplitter == NULL)
{
/* TODO: Show error message */
@@ -288,7 +287,6 @@ CreateVSplitBar(HWND hwnd)
hInst,
NULL);
-
if (!hVSplitter)
{
/* TODO: Show error message */
diff --git a/base/applications/rapps/unattended.cpp
b/base/applications/rapps/unattended.cpp
index b785b9a6a3..08587bb4e2 100644
--- a/base/applications/rapps/unattended.cpp
+++ b/base/applications/rapps/unattended.cpp
@@ -47,7 +47,7 @@ BOOL UseCmdParameters(LPWSTR lpCmdLine)
WCHAR szName[MAX_PATH];
do
{
- if (SetupGetStringFieldW(&Context, 1, szName, MAX_PATH, NULL))
+ if (SetupGetStringFieldW(&Context, 1, szName, _countof(szName),
NULL))
{
arrNames.Add(szName);
}