From 26ac8ac81e875db08c306d95a0c7175323e84a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 3 Feb 2018 23:40:58 +0100 Subject: [PATCH] [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 4118acbca56..cae703f9a92 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 155241bc82b..ba3e7140122 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 b1c2938b6ba..afd134899cc 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 edf44cea4b9..d1f1bb00803 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 b785b9a6a36..08587bb4e27 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); }