[RAPPS] Remove deprecated TODO; use _countof() where needed.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 3 Feb 2018 22:40:58 +0000 (23:40 +0100)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 3 Feb 2018 22:43:53 +0000 (23:43 +0100)
base/applications/rapps/gui.cpp
base/applications/rapps/loaddlg.cpp
base/applications/rapps/misc.cpp
base/applications/rapps/splitter.cpp
base/applications/rapps/unattended.cpp

index 4118acb..cae703f 100644 (file)
@@ -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);
index 155241b..ba3e714 100644 (file)
@@ -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;
index b1c2938..afd1348 100644 (file)
@@ -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);
index edf44ce..d1f1bb0 100644 (file)
@@ -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 */
index b785b9a..08587bb 100644 (file)
@@ -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);
                 }