mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Lint fixes
This commit is contained in:
@ -36,7 +36,7 @@ struct HookBase
|
||||
|
||||
using EventHook = std::unique_ptr<HookBase>;
|
||||
|
||||
template<StringLiteral EventName, typename... CallbackArgs>
|
||||
template <StringLiteral EventName, typename... CallbackArgs>
|
||||
class Event
|
||||
{
|
||||
public:
|
||||
@ -46,12 +46,12 @@ private:
|
||||
struct HookImpl : public HookBase
|
||||
{
|
||||
~HookImpl() override { Event::Remove(this); }
|
||||
HookImpl(CallbackType callback, std::string name) : m_fn(callback), m_name(name){ }
|
||||
HookImpl(CallbackType callback, std::string name) : m_fn(callback), m_name(name) {}
|
||||
CallbackType m_fn;
|
||||
std::string m_name;
|
||||
};
|
||||
public:
|
||||
|
||||
public:
|
||||
// Returns a handle that will unregister the listener when destroyed.
|
||||
static EventHook Register(CallbackType callback, std::string name)
|
||||
{
|
||||
|
@ -7,11 +7,10 @@
|
||||
|
||||
// A useful template for passing string literals as arguments to templates
|
||||
// from: https://ctrpeach.io/posts/cpp20-string-literal-template-parameters/
|
||||
template<size_t N>
|
||||
struct StringLiteral {
|
||||
consteval StringLiteral(const char (&str)[N]) {
|
||||
std::copy_n(str, N, value);
|
||||
}
|
||||
template <size_t N>
|
||||
struct StringLiteral
|
||||
{
|
||||
consteval StringLiteral(const char (&str)[N]) { std::copy_n(str, N, value); }
|
||||
|
||||
char value[N];
|
||||
};
|
||||
|
Reference in New Issue
Block a user