From 44986c79769d4efc2badc5b9c3df2e75e81ac28e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 29 Sep 2022 12:41:07 +0100 Subject: Use auto instead of type names where the type is obvious. --- src/modules/m_spanningtree/metadata.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/m_spanningtree/metadata.cpp') diff --git a/src/modules/m_spanningtree/metadata.cpp b/src/modules/m_spanningtree/metadata.cpp index bf7f47aa9..0b52a093a 100644 --- a/src/modules/m_spanningtree/metadata.cpp +++ b/src/modules/m_spanningtree/metadata.cpp @@ -47,11 +47,11 @@ CmdResult CommandMetadata::Handle(User* srcuser, Params& params) if (params.size() < 6) throw ProtocolException("Insufficient parameters for channel METADATA"); - User* u = ServerInstance->Users.FindUUID(params[1]); + auto u = ServerInstance->Users.FindUUID(params[1]); if (!u) return CmdResult::FAILURE; // User does not exist. - Channel* c = ServerInstance->Channels.Find(params[2]); + auto c = ServerInstance->Channels.Find(params[2]); if (!c) return CmdResult::FAILURE; // Channel does not exist. @@ -77,7 +77,7 @@ CmdResult CommandMetadata::Handle(User* srcuser, Params& params) if (params.size() < 3) throw ProtocolException("Insufficient parameters for channel METADATA"); - Channel* c = ServerInstance->Channels.Find(params[0]); + auto c = ServerInstance->Channels.Find(params[0]); if (!c) return CmdResult::FAILURE; @@ -95,7 +95,7 @@ CmdResult CommandMetadata::Handle(User* srcuser, Params& params) } else { - User* u = ServerInstance->Users.FindUUID(params[0]); + auto u = ServerInstance->Users.FindUUID(params[0]); if (u) { ExtensionItem* item = ServerInstance->Extensions.GetItem(params[1]); -- cgit v1.3.1-10-gc9f91