Files
WickedEngine/WickedEngine/wiArguments.cpp
T
Turánszki János 74cb74d3c9 version 0.60 (#367)
- namespace refactor (example: wiGraphics:: -> wi::graphics)
  - provided namespace compatibility macro for old user code: WICKEDENGINE_BACKWARDS_COMPATIBILITY_0_59
- resource manager will return `Resource` instead of `shared_ptr<Resource>` objects
- MAD shader optimizations
- implemented alpha to coverage with alpha tested materials when MSAA is enabled
- alpha testing fix with transparent shadow maps
- TLAS and scene buffers will be recreated less frequently when things get added/removed from the scene
2021-12-03 21:22:27 +01:00

42 lines
673 B
C++

#include "wiArguments.h"
#include "wiHelper.h"
#include "wiUnorderedSet.h"
#include <sstream>
#include <iterator>
namespace wi::arguments
{
wi::unordered_set<std::string> params;
void Parse(const wchar_t* args)
{
std::wstring from = args;
std::string to;
wi::helper::StringConvert(from, to);
std::istringstream iss(to);
params =
{
std::istream_iterator<std::string>{iss},
std::istream_iterator<std::string>{}
};
}
void Parse(int argc, char *argv[])
{
for (int i = 1; i < argc; i++)
{
params.insert(std::string(argv[i]));
}
}
bool HasArgument(const std::string& value)
{
return params.find(value) != params.end();
}
}