[Flags] Parse flags correctly

This commit is contained in:
/dev/root 2017-03-10 23:41:01 +01:00
parent 8560daf0a1
commit 3bd3d4b707

View File

@ -6,6 +6,8 @@ namespace Components
bool Flags::HasFlag(std::string flag)
{
Flags::ParseFlags();
for (auto entry : Flags::EnabledFlags)
{
if (Utils::String::ToLower(entry) == Utils::String::ToLower(flag))
@ -19,6 +21,10 @@ namespace Components
void Flags::ParseFlags()
{
static bool flagsParsed = false;
if (flagsParsed) return;
flagsParsed = true;
int numArgs;
LPWSTR* argv = CommandLineToArgvW(GetCommandLineW(), &numArgs);