summaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/HyprCtl.cpp6
-rw-r--r--src/debug/HyprCtl.hpp14
2 files changed, 10 insertions, 10 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 7f034570..6382e899 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -1588,11 +1588,11 @@ CHyprCtl::CHyprCtl() {
startHyprCtlSocket();
}
-std::shared_ptr<SHyprCtlCommand> CHyprCtl::registerCommand(SHyprCtlCommand cmd) {
- return m_vCommands.emplace_back(std::make_shared<SHyprCtlCommand>(cmd));
+SP<SHyprCtlCommand> CHyprCtl::registerCommand(SHyprCtlCommand cmd) {
+ return m_vCommands.emplace_back(makeShared<SHyprCtlCommand>(cmd));
}
-void CHyprCtl::unregisterCommand(const std::shared_ptr<SHyprCtlCommand>& cmd) {
+void CHyprCtl::unregisterCommand(const SP<SHyprCtlCommand>& cmd) {
std::erase(m_vCommands, cmd);
}
diff --git a/src/debug/HyprCtl.hpp b/src/debug/HyprCtl.hpp
index cad57447..ebcb87cf 100644
--- a/src/debug/HyprCtl.hpp
+++ b/src/debug/HyprCtl.hpp
@@ -9,21 +9,21 @@ class CHyprCtl {
public:
CHyprCtl();
- std::string makeDynamicCall(const std::string& input);
- std::shared_ptr<SHyprCtlCommand> registerCommand(SHyprCtlCommand cmd);
- void unregisterCommand(const std::shared_ptr<SHyprCtlCommand>& cmd);
- std::string getReply(std::string);
+ std::string makeDynamicCall(const std::string& input);
+ SP<SHyprCtlCommand> registerCommand(SHyprCtlCommand cmd);
+ void unregisterCommand(const SP<SHyprCtlCommand>& cmd);
+ std::string getReply(std::string);
- int m_iSocketFD = -1;
+ int m_iSocketFD = -1;
struct {
bool all = false;
} m_sCurrentRequestParams;
private:
- void startHyprCtlSocket();
+ void startHyprCtlSocket();
- std::vector<std::shared_ptr<SHyprCtlCommand>> m_vCommands;
+ std::vector<SP<SHyprCtlCommand>> m_vCommands;
};
inline std::unique_ptr<CHyprCtl> g_pHyprCtl; \ No newline at end of file