From 1b2916c8451506adccf3ab0a56bbf836d9f3cb36 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 10 Jan 2023 20:57:56 +0000 Subject: Avoid copying shared_ptr when not necessary. --- src/modules/m_showfile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_showfile.cpp') diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index 91463607e..c758a659f 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -79,7 +79,7 @@ public: return CmdResult::SUCCESS; } - void UpdateSettings(std::shared_ptr tag, const std::vector& filecontents) + void UpdateSettings(const std::shared_ptr& tag, const std::vector& filecontents) { introtext = tag->getString("introtext", "Showing " + name); endtext = tag->getString("endtext", "End of " + name); @@ -114,7 +114,7 @@ class ModuleShowFile final private: std::vector cmds; - void ReadTag(std::shared_ptr tag, std::vector& newcmds) + void ReadTag(const std::shared_ptr& tag, std::vector& newcmds) { std::string cmdname = tag->getString("name"); if (cmdname.empty()) -- cgit v1.3.1-10-gc9f91