[RAPPS] Simplified string creation in CAvailableApps

Created a struct that fills itself upon creation.
This makes it easy to include in CAvailableApps without additional weirdness.
This commit is contained in:
Alexander Shaposhnikov 2018-01-02 02:07:12 +02:00
parent b20280a0f9
commit 8d436d9bb5
No known key found for this signature in database
GPG key ID: 2BC6459908479EFC
2 changed files with 34 additions and 71 deletions

View file

@ -79,15 +79,19 @@ private:
typedef BOOL(CALLBACK *AVAILENUMPROC)(CAvailableApplicationInfo *Info, LPCWSTR szFolderPath);
struct AvailableStrings
{
ATL::CStringW szPath;
ATL::CStringW szCabPath;
ATL::CStringW szAppsPath;
ATL::CStringW szSearchPath;
AvailableStrings();
};
class CAvailableApps
{
static ATL::CStringW m_szPath;
static ATL::CStringW m_szCabPath;
static ATL::CStringW m_szAppsPath;
static ATL::CStringW m_szSearchPath;
static BOOL InitializeStaticStrings();
static AvailableStrings m_Strings;
ATL::CAtlList<CAvailableApplicationInfo*> m_InfoList;
public:
@ -106,7 +110,4 @@ public:
const ATL::CStringW& GetFolderPath() const;
const ATL::CStringW& GetAppPath() const;
const ATL::CStringW& GetCabPath() const;
LPCWSTR GetFolderPathString() const;
LPCWSTR GetAppPathString() const;
LPCWSTR GetCabPathString() const;
};