mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
31 lines
433 B
C++
31 lines
433 B
C++
|
#include "Args.hpp"
|
||
|
|
||
|
namespace chatterino {
|
||
|
|
||
|
Args::Args(const QStringList &args)
|
||
|
{
|
||
|
for (auto &&arg : args)
|
||
|
{
|
||
|
if (arg == "--crash-recovery")
|
||
|
{
|
||
|
this->crashRecovery = true;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static Args *instance = nullptr;
|
||
|
|
||
|
void initArgs(const QStringList &args)
|
||
|
{
|
||
|
instance = new Args(args);
|
||
|
}
|
||
|
|
||
|
const Args &getArgs()
|
||
|
{
|
||
|
assert(instance);
|
||
|
|
||
|
return *instance;
|
||
|
}
|
||
|
|
||
|
} // namespace chatterino
|