From 22b06c465a3ec74f01495a4d48aca6cffade45f5 Mon Sep 17 00:00:00 2001 From: Zithia Satazaki Date: Mon, 28 Mar 2022 16:49:13 -0400 Subject: [PATCH] switch subgraph to RegisterPlugin macro --- notes | 7 +++++-- xybrid/data/graph.cpp | 16 ++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/notes b/notes index 51f4a2e..d53fef8 100644 --- a/notes +++ b/notes @@ -35,9 +35,12 @@ TODO { about-license info } - pool I guess + rework RegisterPlugin slightly to automatically give a file-scope access to the PluginInfo + ^ use in graph - implement dlmalloc as backend for some things + - pool I guess + + ? implement dlmalloc as backend for some things more ui options for laptop stuff { invert scrollwheel (knobs) diff --git a/xybrid/data/graph.cpp b/xybrid/data/graph.cpp index b555f86..674c83d 100644 --- a/xybrid/data/graph.cpp +++ b/xybrid/data/graph.cpp @@ -15,20 +15,16 @@ using namespace Xybrid::Config; #include #include -#define qs QStringLiteral - namespace { // clazy:excludeall=non-pod-global-static std::shared_ptr inf; - bool c = PluginRegistry::enqueueRegistration([] { - auto i = std::make_shared(); - i->id = "graph"; - i->displayName = "Subgraph"; - i->createInstance = []{ return std::make_shared(); }; - PluginRegistry::registerPlugin(i); - inf = i; - }); } +RegisterPlugin(Graph, { + i->id = "graph"; + i->displayName = "Subgraph"; + inf = i; +}) + //std::string Graph::pluginName() const { return "Subgraph"; } Graph::Graph() {