From 2d660227273d8692d526f898eb479ef318eb8270 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 22 Nov 2013 18:18:05 -0500 Subject: [PATCH] [LLIMMgr/LLIMPanel] Clean up the now redundant usage of isInviteAllowed() --- indra/newview/llimpanel.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index af8ee0a32..3aedaa8b6 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -874,7 +874,7 @@ BOOL LLFloaterIMPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } // handle case for dropping calling cards (and folders of calling cards) onto invitation panel for invites - else if (isInviteAllowed()) + else { *accept = ACCEPT_NO; @@ -898,28 +898,23 @@ BOOL LLFloaterIMPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, BOOL LLFloaterIMPanel::dropCallingCard(LLInventoryItem* item, BOOL drop) { - BOOL rv = isInviteAllowed(); - if(rv && item && item->getCreatorUUID().notNull()) + if (item && item->getCreatorUUID().notNull()) { - if(drop) + if (drop) { LLDynamicArray ids; ids.put(item->getCreatorUUID()); inviteToSession(ids); } + return true; } - else - { - // set to false if creator uuid is null. - rv = FALSE; - } - return rv; + // return false if creator uuid is null. + return false; } BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop) { - BOOL rv = isInviteAllowed(); - if(rv && category) + if (category) { LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; @@ -932,7 +927,7 @@ BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop) S32 count = items.count(); if(count == 0) { - rv = FALSE; + return false; } else if(drop) { @@ -944,7 +939,7 @@ BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop) inviteToSession(ids); } } - return rv; + return true; } bool LLFloaterIMPanel::isInviteAllowed() const