summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index cb4077b21b..23e1ab6664 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1124,16 +1124,8 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
if (from_task)
{
args["[OBJECTFROMNAME]"] = info->mFromName;
- if (name_found)
- {
- LLNotifyBox::showXml("ObjectGiveItem", args,
- &inventory_offer_callback, (void*)info);
- }
- else
- {
- LLNotifyBox::showXml("ObjectGiveItemUnknownUser", args,
- &inventory_offer_callback, (void*)info);
- }
+ LLNotifyBox::showXml(name_found ? "ObjectGiveItem" : "ObjectGiveItemUnknownUser",
+ args, &inventory_offer_callback, (void*)info);
}
else
{
@@ -1633,10 +1625,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
else
{
- if (dialog == IM_TASK_INVENTORY_OFFERED)
- inventory_offer_handler(info, TRUE);
- else
- inventory_offer_handler(info, FALSE);
+ inventory_offer_handler(info, dialog == IM_TASK_INVENTORY_OFFERED);
}
}
break;