chore: cleansmells in ArchDaemon

This commit is contained in:
sithlord48 2025-05-02 07:47:21 -04:00 committed by Nick Bolton
parent 12fbc2fd57
commit cac63937ff
7 changed files with 7 additions and 7 deletions

View file

@ -21,7 +21,7 @@ void ArchDaemonNone::uninstallDaemon(const char *)
// do nothing // do nothing
} }
int ArchDaemonNone::daemonize(const char *name, DaemonFunc func) int ArchDaemonNone::daemonize(const char *name, DaemonFunc const &func)
{ {
// simply forward the call to func. obviously, this doesn't // simply forward the call to func. obviously, this doesn't
// do any daemonizing. // do any daemonizing.

View file

@ -29,7 +29,7 @@ public:
const char *name, const char *description, const char *pathname, const char *commandLine, const char *dependencies const char *name, const char *description, const char *pathname, const char *commandLine, const char *dependencies
) override; ) override;
void uninstallDaemon(const char *name) override; void uninstallDaemon(const char *name) override;
int daemonize(const char *name, DaemonFunc func) override; int daemonize(const char *name, DaemonFunc const &func) override;
bool canInstallDaemon(const char *name) override; bool canInstallDaemon(const char *name) override;
bool isDaemonInstalled(const char *name) override; bool isDaemonInstalled(const char *name) override;
void installDaemon() override; void installDaemon() override;

View file

@ -88,7 +88,7 @@ public:
\c ArchMiscWindows::daemonFailed() to indicate startup failure. \c ArchMiscWindows::daemonFailed() to indicate startup failure.
</ul> </ul>
*/ */
virtual int daemonize(const char *name, DaemonFunc func) = 0; virtual int daemonize(const char *name, DaemonFunc const &func) = 0;
//! Check if user has permission to install the daemon //! Check if user has permission to install the daemon
/*! /*!

View file

@ -44,7 +44,7 @@ bool alreadyDaemonized()
#endif #endif
int ArchDaemonUnix::daemonize(const char *name, DaemonFunc func) int ArchDaemonUnix::daemonize(const char *name, DaemonFunc const &func)
{ {
#ifdef __APPLE__ #ifdef __APPLE__
if (alreadyDaemonized()) if (alreadyDaemonized())

View file

@ -20,5 +20,5 @@ public:
~ArchDaemonUnix() override = default; ~ArchDaemonUnix() override = default;
// IArchDaemon overrides // IArchDaemon overrides
int daemonize(const char *name, DaemonFunc func) override; int daemonize(const char *name, DaemonFunc const &func) override;
}; };

View file

@ -187,7 +187,7 @@ void ArchDaemonWindows::uninstallDaemon(const char *name)
} }
} }
int ArchDaemonWindows::daemonize(const char *name, DaemonFunc func) int ArchDaemonWindows::daemonize(const char *name, DaemonFunc const &func)
{ {
assert(name != nullptr); assert(name != nullptr);
assert(func != nullptr); assert(func != nullptr);

View file

@ -74,7 +74,7 @@ public:
void uninstallDaemon(const char *name) override; void uninstallDaemon(const char *name) override;
void installDaemon() override; void installDaemon() override;
void uninstallDaemon() override; void uninstallDaemon() override;
int daemonize(const char *name, DaemonFunc func) override; int daemonize(const char *name, DaemonFunc const &func) override;
bool canInstallDaemon(const char *name) override; bool canInstallDaemon(const char *name) override;
bool isDaemonInstalled(const char *name) override; bool isDaemonInstalled(const char *name) override;
std::string commandLine() const std::string commandLine() const