refactor: turn StreamerMode into a singleton(-like thing) (#5216)

This commit is contained in:
nerix
2024-03-01 21:12:02 +01:00
committed by GitHub
parent ea19c5c989
commit c1fa51242f
28 changed files with 386 additions and 210 deletions
@@ -0,0 +1,12 @@
#pragma once
#include "singletons/StreamerMode.hpp"
class DisabledStreamerMode : public chatterino::IStreamerMode
{
public:
bool isEnabled() const override
{
return false;
}
};
+7
View File
@@ -228,6 +228,13 @@ public:
return nullptr;
}
IStreamerMode *getStreamerMode() override
{
assert(false && "EmptyApplication::getStreamerMode was called without "
"being initialized");
return nullptr;
}
private:
Paths paths_;
Args args_;