From dac2ef3a9ee1bde2cdc932fd1df7e10803eb4a95 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Tue, 16 Jan 2024 10:36:30 +0100 Subject: [PATCH] const more args --- src/singletons/NativeMessaging.cpp | 8 ++++---- src/singletons/NativeMessaging.hpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/singletons/NativeMessaging.cpp b/src/singletons/NativeMessaging.cpp index d2fb7b29d..f8381783a 100644 --- a/src/singletons/NativeMessaging.cpp +++ b/src/singletons/NativeMessaging.cpp @@ -34,11 +34,11 @@ namespace chatterino { using namespace literals; -void registerNmManifest(Paths &paths, const QString &manifestFilename, +void registerNmManifest(const Paths &paths, const QString &manifestFilename, const QString ®istryKeyName, const QJsonDocument &document); -void registerNmHost(Paths &paths) +void registerNmHost(const Paths &paths) { if (paths.isPortable()) { @@ -80,7 +80,7 @@ void registerNmHost(Paths &paths) } } -void registerNmManifest(Paths &paths, const QString &manifestFilename, +void registerNmManifest(const Paths &paths, const QString &manifestFilename, const QString ®istryKeyName, const QJsonDocument &document) { @@ -99,7 +99,7 @@ void registerNmManifest(Paths &paths, const QString &manifestFilename, #endif } -std::string &getNmQueueName(Paths &paths) +std::string &getNmQueueName(const Paths &paths) { static std::string name = "chatterino_gui" + paths.applicationFilePathHash.toStdString(); diff --git a/src/singletons/NativeMessaging.hpp b/src/singletons/NativeMessaging.hpp index 1186315da..5d0633358 100644 --- a/src/singletons/NativeMessaging.hpp +++ b/src/singletons/NativeMessaging.hpp @@ -16,8 +16,8 @@ class Channel; using ChannelPtr = std::shared_ptr; -void registerNmHost(Paths &paths); -std::string &getNmQueueName(Paths &paths); +void registerNmHost(const Paths &paths); +std::string &getNmQueueName(const Paths &paths); Atomic> &nmIpcError();