From 54a9c7f4f289a92d14e62547c0b47c710d48cce7 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 2 Apr 2012 01:59:23 +1000 Subject: More automated whitespace cleanups. --- linden/indra/newview/llviewergenericmessage.cpp | 16 +- linden/indra/newview/llviewermessage.cpp | 364 ++++++++++++------------ linden/indra/newview/wlfloatermanager.cpp | 37 ++- linden/indra/newview/wlretrievesettings.cpp | 16 +- 4 files changed, 216 insertions(+), 217 deletions(-) diff --git a/linden/indra/newview/llviewergenericmessage.cpp b/linden/indra/newview/llviewergenericmessage.cpp index 8078888..536a803 100644 --- a/linden/indra/newview/llviewergenericmessage.cpp +++ b/linden/indra/newview/llviewergenericmessage.cpp @@ -1,12 +1,12 @@ -/** +/** * @file llviewergenericmessage.cpp * @brief Handle processing of "generic messages" which contain short lists of strings. * @author James Cook * * $LicenseInfo:firstyear=2007&license=viewergpl$ - * + * * Copyright (c) 2007-2009, Linden Research, Inc. - * + * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 @@ -14,17 +14,17 @@ * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * + * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or * online at * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * + * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, * and agree to abide by those obligations. - * + * * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. @@ -84,7 +84,7 @@ void process_generic_message(LLMessageSystem* msg, void**) msg->getUUID("AgentData", "AgentID", agent_id); std::string method; msg->getStringFast(_PREHASH_MethodData, _PREHASH_Method, method); - + // TODO: Use a proper dispatcher. if(method == "Windlight") { @@ -106,7 +106,7 @@ void process_generic_message(LLMessageSystem* msg, void**) if(!gGenericDispatcher.dispatch(request, invoice, strings)) { - llwarns << "GenericMessage " << request << " failed to dispatch" + llwarns << "GenericMessage " << request << " failed to dispatch" << llendl; } } diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 9b1b00d..fc72147 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -1,12 +1,12 @@ -/** +/** * @file llviewermessage.cpp * @brief Dumping ground for viewer-side message system callbacks. * * $LicenseInfo:firstyear=2002&license=viewergpl$ - * + * * Copyright (c) 2002-2009, Linden Research, Inc. - * + * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 @@ -14,17 +14,17 @@ * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * + * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or * online at * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * + * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, * and agree to abide by those obligations. - * + * * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. @@ -37,7 +37,7 @@ #include -#include "llaudioengine.h" +#include "llaudioengine.h" #include "indra_constants.h" #include "lscript_byteformat.h" #include "mean_collision_data.h" @@ -196,8 +196,8 @@ const U32 OFFER_THROTTLE_MAX_COUNT=5; //number of items per time period const F32 OFFER_THROTTLE_TIME=10.f; //time period in seconds //script permissions -const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] = - { +const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] = + { "ScriptTakeMoney", "ActOnControlInputs", "RemapControlInputs", @@ -211,7 +211,7 @@ const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] = "ControlYourCamera" }; -const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] = +const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] = { TRUE, // ScriptTakeMoney, FALSE, // ActOnControlInputs @@ -463,7 +463,7 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data) // char image_uuid_str[UUID_STR_SIZE]; /* Flawfinder: ignore */ // memcpy(image_uuid_str, pos_uuid+2, UUID_STR_SIZE-1); /* Flawfinder: ignore */ // image_uuid_str[UUID_STR_SIZE-1] = 0; - + // LLUUID image_uuid(image_uuid_str); // LL_INFOS("Messaging") << "Found UUID: " << image_uuid << LL_ENDL; @@ -538,7 +538,7 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data) // else // { // LLFILE* fIn = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */ -// if (fIn) +// if (fIn) // { // LLPointer ImageUtility = new LLImageJ2C; // LLPointer TargaUtility = new LLImageTGA; @@ -559,13 +559,13 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data) // ImageUtility->updateData(); // ImageUtility->decode(image, 100000.0f); - + // TargaUtility->encode(image); // U8 *data = TargaUtility->getData(); // S32 data_size = TargaUtility->getDataSize(); // std::string file_path = gDirUtilp->getDirName(filename); - + // std::string output_file = llformat("%s/image-%03d.tga", file_path.c_str(), image_num);//filename; // //S32 name_len = output_file.length(); // //strcpy(&output_file[name_len-3], "tga"); @@ -753,10 +753,10 @@ private: std::string mFromName; }; -//unlike the FetchObserver for AgentOffer, we only make one +//unlike the FetchObserver for AgentOffer, we only make one //instance of the AddedObserver for TaskOffers -//and it never dies. We do this because we don't know the UUID of -//task offers until they are accepted, so we don't wouldn't +//and it never dies. We do this because we don't know the UUID of +//task offers until they are accepted, so we don't wouldn't //know what to watch for, so instead we just watch for all additions. class LLOpenTaskOffer : public LLInventoryAddedObserver { @@ -773,7 +773,7 @@ LLOpenTaskOffer* gNewInventoryObserver=NULL; void start_new_inventory_observer() { - if (!gNewInventoryObserver) //task offer observer + if (!gNewInventoryObserver) //task offer observer { // Observer is deleted by gInventory gNewInventoryObserver = new LLOpenTaskOffer; @@ -832,7 +832,7 @@ protected: //Returns TRUE if we are OK, FALSE if we are throttled -//Set check_only true if you want to know the throttle status +//Set check_only true if you want to know the throttle status //without registering a hit bool check_offer_throttle(const std::string& from_name, bool check_only) { @@ -848,7 +848,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) { return gThrottleTimer.hasExpired(); } - + if(gThrottleTimer.checkExpirationAndReset(OFFER_THROTTLE_TIME)) { LL_DEBUGS("Messaging") << "Throttle Expired" << LL_ENDL; @@ -894,7 +894,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) } } } - + void open_offer(const std::vector& items, const std::string& from_name) { std::vector::const_iterator it = items.begin(); @@ -927,7 +927,7 @@ void open_offer(const std::vector& items, const std::string& from_name) // Don't show WindLight settings as notecards. if(!LLWLParamManager::isSettingsNotecard(item->getName())) { - open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), + open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), LLUUID::null, show_keep_discard, LLUUID::null, FALSE); } break; @@ -943,7 +943,7 @@ void open_offer(const std::vector& items, const std::string& from_name) } } //highlight item, if it's not in the trash or lost+found - + // Don't auto-open the inventory floater LLInventoryView* view = LLInventoryView::getActiveInventory(); if(!view) @@ -1023,7 +1023,7 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {} BOOL matches(const LLNotificationPtr notification) const { - if(notification->getName() == "ObjectGiveItem" + if(notification->getName() == "ObjectGiveItem" || notification->getName() == "ObjectGiveItemUnknownUser" || notification->getName() == "UserGiveItem") { @@ -1099,7 +1099,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& std::string name; gAgent.buildFullname(name); msg->addStringFast(_PREHASH_FromAgentName, name); - msg->addStringFast(_PREHASH_Message, ""); + msg->addStringFast(_PREHASH_Message, ""); msg->addU32Fast(_PREHASH_ParentEstateID, 0); msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); @@ -1159,9 +1159,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& { from_string = chatHistory_string = mFromName; } - + bool busy=FALSE; - + switch(button) { case IOR_ACCEPT: @@ -1183,7 +1183,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // ACCEPT. The math for the dialog works, because the accept // for inventory_offered, task_inventory_offer or // group_notice_inventory is 1 greater than the offer integer value. - // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, + // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), @@ -1283,7 +1283,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& LLFloaterChat::addChatHistory(chat); // If it's from an agent, we have to fetch the item to throw - // it away. If it's from a task or group, just denying the + // it away. If it's from a task or group, just denying the // request will suffice to discard the item. if(IM_INVENTORY_OFFERED == mIM) { @@ -1301,7 +1301,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& { opener = discard_agent_offer; } - + } if (busy && (!mFromGroup && !mFromObject)) { @@ -1333,7 +1333,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) info->forceResponse(IOR_BUSY); return; } - + //If muted, don't even go through the messaging stuff. Just curtail the offer here. if (LLMuteList::getInstance()->isMuted(info->mFromID, info->mFromName)) { @@ -1372,7 +1372,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) } // [/RLVa:KB] } - + LLSD args; args["[OBJECTNAME]"] = msg; @@ -1475,7 +1475,7 @@ static LLNotificationFunctorRegistration group_vote_callback_reg("GroupVote", gr bool lure_callback(const LLSD& notification, const LLSD& response) { S32 option = 0; - if (response.isInteger()) + if (response.isInteger()) { option = response.asInteger(); } @@ -1483,7 +1483,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response) { option = LLNotification::getSelectedOption(notification, response); } - + LLUUID from_id = notification["payload"]["from_id"].asUUID(); LLUUID lure_id = notification["payload"]["lure_id"].asUUID(); BOOL godlike = notification["payload"]["godlike"].asBoolean(); @@ -1543,7 +1543,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) S32 binary_bucket_size; LLChat chat; std::string buffer; - + // *TODO:translate - need to fix the full name to first/last (maybe) msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, from_id); msg->getBOOLFast(_PREHASH_MessageBlock, _PREHASH_FromGroup, from_group); @@ -1568,7 +1568,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) BOOL is_owned_by_me = FALSE; LLUUID computed_session_id = LLIMMgr::computeSessionID(dialog,from_id); - + chat.mMuted = is_muted && !is_linden; chat.mFromID = from_id; chat.mFromName = name; @@ -1596,7 +1596,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) || dialog == IM_TYPING_STOP || dialog == IM_BUSY_AUTO_RESPONSE) { - + if(session_id != computed_session_id) { session_id = computed_session_id; @@ -1835,7 +1835,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } } //InstantMessageResponseItem< - + } } } @@ -1855,10 +1855,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLNotifications::instance().add("SystemMessageTip",args); break; - case IM_NOTHING_SPECIAL: + case IM_NOTHING_SPECIAL: // Don't show dialog, just do IM if (!gAgent.isGodlike() - && gAgent.getRegion()->isPrelude() + && gAgent.getRegion()->isPrelude() && to_id.isNull() ) { // do nothing -- don't distract newbies in @@ -1875,11 +1875,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // [/RLVa:KB] // else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) - else if ( (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) && + else if ( (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) && ( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, from_id))) ) // [/RLVa:KB] { - // return a standard "busy" message, but only do it to online IM + // return a standard "busy" message, but only do it to online IM // (i.e. not other auto responses and not store-and-forward IM) if (!gIMMgr->hasSession(session_id)) { @@ -1905,7 +1905,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // now store incoming IM in chat history buffer = separator_string + message.substr(message_offset); - + LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; // add to IM panel, but do not bother the user @@ -1936,7 +1936,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) // Filter region messages that weren't sent by a Linden - if ( (rlv_handler_t::isEnabled()) && (LLMuteList::getInstance()) && + if ( (rlv_handler_t::isEnabled()) && (LLMuteList::getInstance()) && (!LLMuteList::getInstance()->isLinden(name)) && (from_id != gAgent.getID()) ) { if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) @@ -2051,7 +2051,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) U8 item_name[DB_INV_ITEM_NAME_BUF_SIZE]; }* notice_bin_bucket; - // Make sure the binary bucket is big enough to hold the header + // Make sure the binary bucket is big enough to hold the header // and a null terminated item name. if ( (binary_bucket_size < (S32)((sizeof(notice_bucket_header_t) + sizeof(U8)))) || (binary_bucket[binary_bucket_size - 1] != '\0') ) @@ -2072,7 +2072,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (has_inventory) { info = new LLOfferInfo; - + info->mIM = IM_GROUP_NOTICE; info->mFromID = from_id; info->mFromGroup = from_group; @@ -2088,7 +2088,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) info->mDesc = item_name; info->mHost = msg->getSender(); } - + std::string str(message); // Tokenize the string. @@ -2292,7 +2292,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LL_WARNS("Messaging") << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << LL_ENDL; } break; - + case IM_SESSION_SEND: { if (!is_linden && is_busy) @@ -2354,7 +2354,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { group_name = std::string((char*)binary_bucket); } - chat.mText = std::string("IM [") + group_name + std::string("] ") + name + chat.mText = std::string("IM [") + group_name + std::string("] ") + name + separator_string + saved + message.substr(message_offset); } else @@ -2401,7 +2401,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } std::string tempname = name; - + size_t found = tempname.find(" "); while(found != std::string::npos) { @@ -2413,7 +2413,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { name = ">>"; chat.mFromName = name; - + } std::ostringstream link; @@ -2465,14 +2465,14 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) gIMMgr->addMessage(session_id, from_id, name, buffer); } break; - + case IM_LURE_USER: { if (is_muted) - { + { return; } - else if (is_busy) + else if (is_busy) { busy_message(msg,from_id); } @@ -2608,7 +2608,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } std::string url; - + url.assign((char*)binary_bucket, binary_bucket_size-1); args["MESSAGE"] = message; args["URL"] = url; @@ -2658,11 +2658,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // as the database should already include the relationship. But it // doesn't hurt for dupes. LLAvatarTracker::formFriendship(from_id); - + std::vector strings; strings.push_back(from_id.asString()); send_generic_message("requestonlinenotification", strings); - + args["NAME"] = name; LLNotifications::instance().add("FriendshipAccepted", args); } @@ -2682,7 +2682,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } } -void busy_message (LLMessageSystem* msg, LLUUID from_id) +void busy_message (LLMessageSystem* msg, LLUUID from_id) { if (gAgent.getBusy()) { @@ -2725,7 +2725,7 @@ bool callingcard_offer_callback(const LLSD& notification, const LLSD& response) msg->sendReliable(LLHost(notification["payload"]["sender"].asString())); break; case 1: - // decline + // decline msg->newMessageFast(_PREHASH_DeclineCallingCard); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -2776,7 +2776,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**) if(!source_name.empty()) { - if (gAgent.getBusy() + if (gAgent.getBusy() || LLMuteList::getInstance()->isMuted(source_id, source_name, LLMute::flagTextChat)) { // automatically decline offer @@ -2833,13 +2833,13 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) msg->getString("ChatData", "FromName", from_name); chat.mFromName = from_name; - + msg->getUUID("ChatData", "SourceID", from_id); chat.mFromID = from_id; - + // Object owner for objects msg->getUUID("ChatData", "OwnerID", owner_id); - + msg->getU8Fast(_PREHASH_ChatData, _PREHASH_SourceType, source_temp); chat.mSourceType = (EChatSourceType)source_temp; @@ -2848,9 +2848,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) msg->getU8Fast(_PREHASH_ChatData, _PREHASH_Audible, audible_temp); chat.mAudible = (EChatAudible)audible_temp; - + chat.mTime = LLFrameTimer::getElapsedSeconds(); - + BOOL is_busy = gAgent.getBusy(); BOOL is_muted = FALSE; @@ -2858,7 +2858,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) is_muted = LLMuteList::getInstance()->isMuted( from_id, from_name, - LLMute::flagTextChat) + LLMute::flagTextChat) || LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagTextChat); is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && LLMuteList::getInstance()->isLinden(from_name); @@ -2868,9 +2868,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (chatter) { chat.mPosAgent = chatter->getPositionAgent(); - + // Make swirly things only for talking objects. (not script debug messages, though) -// if (chat.mSourceType == CHAT_SOURCE_OBJECT +// if (chat.mSourceType == CHAT_SOURCE_OBJECT // && chat.mChatType != CHAT_TYPE_DEBUG_MSG) // [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-10 (RLVa-1.0.0g) // Don't show swirly things for llOwnerSay() chat here because we handle those further down @@ -2882,7 +2882,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) LLPointer psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); psc->setSourceObject(chatter); psc->setColor(color); - //We set the particles to be owned by the object's owner, + //We set the particles to be owned by the object's owner, //just in case they should be muted by the mute list psc->setOwnerUUID(owner_id); LLViewerPartSim::getInstance()->addPartSource(psc); @@ -2892,7 +2892,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (is_audible && (is_linden || (!is_muted && !is_busy))) { - if (chat.mChatType != CHAT_TYPE_START + if (chat.mChatType != CHAT_TYPE_START && chat.mChatType != CHAT_TYPE_STOP) { gAgent.heardChat(chat.mFromID); @@ -2902,7 +2902,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) is_owned_by_me = chatter->permYouOwner(); } - if(chat.mSourceType == CHAT_SOURCE_OBJECT + if(chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mChatType != CHAT_TYPE_DEBUG_MSG && !owner_id.isNull() && owner_id != gAgent.getID()) @@ -2964,7 +2964,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg); // [RLVa:KB] - Checked: 2009-10-06 (RLVa-1.0.4d) | Modified: RLVa-1.0.4d - if ( (rlv_handler_t::isEnabled()) && + if ( (rlv_handler_t::isEnabled()) && (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) && (CHAT_TYPE_OWNER != chat.mChatType) ) { // NOTE: chatter can be NULL (may not have rezzed yet, or could be another avie's HUD attachment) @@ -2973,7 +2973,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // Filtering "rules": // avatar => filter all avie text (unless it's this avie or they're an exemption) // objects => filter everything except attachments this avie owns - if ( ( (CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID()) ) || + if ( ( (CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID()) ) || ( (CHAT_SOURCE_OBJECT == chat.mSourceType) && ((!is_owned_by_me) || (!is_attachment)) ) ) { if (!rlvIsEmote(mesg)) @@ -2996,7 +2996,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) { if (chat.mFromID != gAgent.getID()) from_name = RlvStrings::getAnonym(from_name); - } + } else { if ( (!is_owned_by_me) || (!is_attachment) ) @@ -3038,7 +3038,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (LLFloaterMap::getInstance()) { PanelRadarEntry* entry = LLFloaterMap::getInstance()->getRadar()->getEntry(from_id); - if (entry) + if (entry) { entry->setStatus(RADAR_STATUS_TYPING); } @@ -3059,7 +3059,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (LLFloaterMap::getInstance()) { PanelRadarEntry* entry = LLFloaterMap::getInstance()->getRadar()->getEntry(from_id); - if (entry) + if (entry) { entry->setStatus(RADAR_STATUS_NONE); } @@ -3076,7 +3076,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (!is_muted && !is_busy) { - + BOOL sUseChatBubbles = gSavedSettings.getBOOL("UseChatBubbles"); if(sUseChatBubbles) { @@ -3162,7 +3162,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) verb = " retained: @"; mesg = strRetained; } - else + else { verb = ": @"; if (!strExecuted.empty()) @@ -3183,7 +3183,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) LLPointer psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); psc->setSourceObject(chatter); psc->setColor(color); - //We set the particles to be owned by the object's owner, + //We set the particles to be owned by the object's owner, //just in case they should be muted by the mute list psc->setOwnerUUID(owner_id); LLViewerPartSim::getInstance()->addPartSource(psc); @@ -3211,7 +3211,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) chat.mText += verb; chat.mText += mesg; } - + if (chatter) { chat.mPosAgent = chatter->getPositionAgent(); @@ -3230,9 +3230,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // T * * * F Yes Yes chat.mMuted = is_muted && !is_linden; - - - if (!visible_in_chat_bubble + + + if (!visible_in_chat_bubble && (is_linden || !is_busy || is_owned_by_me)) { // show on screen and add to history @@ -3248,10 +3248,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // Simulator we're on is informing the viewer that the agent -// is starting to teleport (perhaps to another sim, perhaps to the -// same sim). If we initiated the teleport process by sending some kind -// of TeleportRequest, then this info is redundant, but if the sim -// initiated the teleport (via a script call, being killed, etc.) +// is starting to teleport (perhaps to another sim, perhaps to the +// same sim). If we initiated the teleport process by sending some kind +// of TeleportRequest, then this info is redundant, but if the sim +// initiated the teleport (via a script call, being killed, etc.) // then this info is news to us. void process_teleport_start(LLMessageSystem *msg, void**) { @@ -3278,7 +3278,7 @@ void process_teleport_start(LLMessageSystem *msg, void**) gTeleportDisplay = TRUE; gAgent.setTeleportState( LLAgent::TELEPORT_START ); make_ui_sound("UISndTeleportOut"); - + // Don't call LLFirstUse::useTeleport here because this could be // due to being killed, which would send you home, not to a Telehub } @@ -3315,7 +3315,7 @@ void process_teleport_progress(LLMessageSystem* msg, void**) //if we don't find the coresponding mapping in our progress mappings std::string message = buffer; - if (LLAgent::sTeleportProgressMessages.find(buffer) != + if (LLAgent::sTeleportProgressMessages.find(buffer) != LLAgent::sTeleportProgressMessages.end() ) { message = LLAgent::sTeleportProgressMessages[buffer]; @@ -3376,7 +3376,7 @@ public: -class LLPostTeleportNotifiers : public LLEventTimer +class LLPostTeleportNotifiers : public LLEventTimer { public: LLPostTeleportNotifiers(); @@ -3403,10 +3403,10 @@ BOOL LLPostTeleportNotifiers::tick() LLInventoryFetchDescendentsObserver::folder_ref_t folders; LLUUID folder_id; folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); - if(folder_id.notNull()) + if(folder_id.notNull()) folders.push_back(folder_id); folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); - if(folder_id.notNull()) + if(folder_id.notNull()) folders.push_back(folder_id); if(!folders.empty()) { @@ -3462,7 +3462,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**) msg->getU64Fast(_PREHASH_Info, _PREHASH_RegionHandle, region_handle); U32 teleport_flags; msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags); - + U32 region_size_x = 256; msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x); U32 region_size_y = 256; @@ -3474,17 +3474,17 @@ void process_teleport_finish(LLMessageSystem* msg, void**) region_size_x = 256; region_size_y = 256; } - + std::string seedCap; msg->getStringFast(_PREHASH_Info, _PREHASH_SeedCapability, seedCap); - // update home location if we are teleporting out of prelude - specific to teleporting to welcome area + // update home location if we are teleporting out of prelude - specific to teleporting to welcome area if((teleport_flags & TELEPORT_FLAGS_SET_HOME_TO_TARGET) && (!gAgent.isGodlike())) { gAgent.setHomePosRegion(region_handle, pos); - // Create a timer that will send notices when teleporting is all finished. Since this is + // Create a timer that will send notices when teleporting is all finished. Since this is // based on the LLEventTimer class, it will be managed by that class and not orphaned or leaked. new LLPostTeleportNotifiers(); } @@ -3587,7 +3587,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) msg->getVector3Fast(_PREHASH_Data, _PREHASH_LookAt, look_at); U64 region_handle; msg->getU64Fast(_PREHASH_Data, _PREHASH_RegionHandle, region_handle); - + std::string version_channel; msg->getString("SimData", "ChannelVersion", version_channel); @@ -3609,8 +3609,8 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) LL_WARNS("Messaging") << "current region " << gAgent.getRegion()->getOriginGlobal() << LL_ENDL; } - LL_WARNS("Messaging") << "Agent being sent to invalid home region: " - << x << ":" << y + LL_WARNS("Messaging") << "Agent being sent to invalid home region: " + << x << ":" << y << " current pos " << gAgent.getPositionGlobal() << LL_ENDL; LLAppViewer::instance()->forceDisconnect("You were sent to an invalid region."); @@ -3658,7 +3658,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) // if (avatarp) { // Chat the "back" SLURL. (DEV-4907) - // Show this in the console if DisableTeleportScreens is true + // Show this in the console if DisableTeleportScreens is true // Why? Because it's nifty, that's why -- MC LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); chat.mSourceType = CHAT_SOURCE_SYSTEM; @@ -3748,7 +3748,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) { avatarp->mFootPlane.clearVec(); } - + // send walk-vs-run status gAgent.sendWalkRun(gAgent.getRunning() || gAgent.getAlwaysRun()); @@ -3805,7 +3805,7 @@ void process_crossed_region(LLMessageSystem* msg, void**) LLHost sim_host(sim_ip, sim_port); U64 region_handle; msg->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle); - + std::string seedCap; msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap); @@ -3874,11 +3874,11 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) const U8 DUP_MSGS = 1; // HACK! number of times to repeat data on motionless agent // Store data on last sent update so that if no changes, no send - static LLVector3 last_camera_pos_agent, - last_camera_at, + static LLVector3 last_camera_pos_agent, + last_camera_at, last_camera_left, last_camera_up; - + static LLVector3 cam_center_chg, cam_rot_chg; @@ -3931,13 +3931,13 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) head_rot_chg = dot(last_head_rot, head_rotation); - if (force_send || - (cam_center_chg.magVec() > TRANSLATE_THRESHOLD) || - (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) || + if (force_send || + (cam_center_chg.magVec() > TRANSLATE_THRESHOLD) || + (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) || (last_render_state != render_state) || (cam_rot_chg.magVec() > ROTATION_THRESHOLD) || control_flag_change != 0 || - flag_change != 0) + flag_change != 0) { /* if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) @@ -3945,7 +3945,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) //LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL; LL_INFOS("Messaging") << "head_rot_chg = " << head_rot_chg << LL_ENDL; } - if (cam_rot_chg.magVec() > ROTATION_THRESHOLD) + if (cam_rot_chg.magVec() > ROTATION_THRESHOLD) { LL_INFOS("Messaging") << "cam rot " << cam_rot_chg.magVec() << LL_ENDL; } @@ -3976,8 +3976,8 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) // some threshold from the last update, however this can break fine // adjustments when trying to aim an attached gun, so what we do here // (where we would normally skip sending an update when nothing has changed) - // is gradually reduce the threshold to allow a better update to - // eventually get sent... should update to within 0.5 degrees in less + // is gradually reduce the threshold to allow a better update to + // eventually get sent... should update to within 0.5 degrees in less // than a second. if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT + (MAX_HEAD_ROT_QDOT - THRESHOLD_HEAD_ROT_QDOT) * duplicate_count / AGENT_UPDATES_PER_SECOND) { @@ -4010,13 +4010,13 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) // { // LL_INFOS("Messaging") << "Sending camera center " << camera_pos_agent << LL_ENDL; // } - + msg->addVector3Fast(_PREHASH_CameraCenter, camera_pos_agent); msg->addVector3Fast(_PREHASH_CameraAtAxis, LLViewerCamera::getInstance()->getAtAxis()); msg->addVector3Fast(_PREHASH_CameraLeftAxis, LLViewerCamera::getInstance()->getLeftAxis()); msg->addVector3Fast(_PREHASH_CameraUpAxis, LLViewerCamera::getInstance()->getUpAxis()); msg->addF32Fast(_PREHASH_Far, gAgent.mDrawDistance); - + msg->addU32Fast(_PREHASH_ControlFlags, control_flags); if (gDebugClicks) @@ -4045,7 +4045,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) // LL_DEBUGS("Messaging") << "agent " << avatar_pos_agent << " cam " << camera_pos_agent << LL_ENDL; - // Copy the old data + // Copy the old data last_head_rot = head_rotation; last_render_state = render_state; last_camera_pos_agent = camera_pos_agent; @@ -4064,7 +4064,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) extern U32 gObjectBits; void process_object_update(LLMessageSystem *mesgsys, void **user_data) -{ +{ LLMemType mt(LLMemType::MTYPE_OBJECT); // Update the data counters if (mesgsys->getReceiveCompressedSize()) @@ -4270,7 +4270,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **) // Don't play sounds triggered by someone you muted. if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return; - + // Don't play sounds from an object you muted if (LLMuteList::getInstance()->isMuted(object_id)) return; @@ -4300,7 +4300,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **) { return; }*/ - + gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global); } @@ -4324,10 +4324,10 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data) if (LLMuteList::getInstance()->isMuted(object_id)) return; if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return; - + LLAudioSource *sourcep = objectp->getAudioSource(owner_id); if (!sourcep) return; - + LLAudioData *datap = gAudiop->getAudioData(sound_id); // Note that I don't actually do any loading of the @@ -4341,7 +4341,7 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data) { return; }*/ - + // Add audioData starts a transfer internally. sourcep->addAudioData(datap, FALSE); } @@ -4369,12 +4369,12 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data) // we don't know about this object, just bail return; } - + if (LLMuteList::getInstance()->isMuted(object_id)) return; - + if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return; - + // Don't play sounds from a region with maturity above current agent maturity // Actually, let's -- MC /*LLVector3d pos = objectp->getPositionGlobal(); @@ -4382,7 +4382,7 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data) { return; }*/ - + objectp->setAttachedSound(sound_id, owner_id, gain, flags); } @@ -4421,7 +4421,7 @@ void process_health_message(LLMessageSystem *mesgsys, void **user_data) void process_sim_stats(LLMessageSystem *msg, void **user_data) -{ +{ S32 count = msg->getNumberOfBlocks("Stat"); for (S32 i = 0; i < count; ++i) { @@ -4570,7 +4570,7 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) BOOL was_flying = gAgent.getFlying(); regionp->setRegionFlags(region_flags); regionp->setMaxTasks(max_tasks_per_region); - // HACK: This makes agents drop from the sky if the region is + // HACK: This makes agents drop from the sky if the region is // set to no fly while people are still in the sim. if (was_flying && regionp->getBlockFly()) { @@ -4587,7 +4587,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) LLUUID uuid; S32 anim_sequence_id; LLVOAvatar *avatarp; - + mesgsys->getUUIDFast(_PREHASH_Sender, _PREHASH_ID, uuid); //clear animation flags @@ -4604,7 +4604,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) S32 num_source_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationSourceList); avatarp->mSignaledAnimations.clear(); - + if (avatarp->isSelf()) { LLUUID object_id; @@ -4614,7 +4614,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); - LL_DEBUGS("Messaging") << "Animation id " << animation_id + LL_DEBUGS("Messaging") << "Animation id " << animation_id << " from self using sequence id " << anim_sequence_id << LL_ENDL; avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; @@ -4622,7 +4622,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) if (i < num_source_blocks) { mesgsys->getUUIDFast(_PREHASH_AnimationSourceList, _PREHASH_ObjectID, object_id, i); - + LLViewerObject* object = gObjectList.findObject(object_id); if (object) { @@ -4654,8 +4654,8 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; - LL_DEBUGS("Messaging") << "Received animation id " << animation_id - << " from " << uuid + LL_DEBUGS("Messaging") << "Received animation id " << animation_id + << " from " << uuid << " using sequence id " << anim_sequence_id << LL_ENDL; } } @@ -4730,7 +4730,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) { gAgent.setSitCamera(sitObjectID, camera_eye, camera_at); } - + gAgent.mForceMouselook = force_mouselook; LLViewerObject* object = gObjectList.findObject(sitObjectID); @@ -4826,7 +4826,7 @@ void process_set_follow_cam_properties(LLMessageSystem *mesgsys, void **user_dat LLFollowCamMgr::setFocusThreshold(source_id, value); break; case FOLLOWCAM_ACTIVE: - //if 1, set using followcam,. + //if 1, set using followcam,. LLFollowCamMgr::setCameraActive(source_id, value != 0.f); break; case FOLLOWCAM_POSITION_X: @@ -4878,7 +4878,7 @@ void process_set_follow_cam_properties(LLMessageSystem *mesgsys, void **user_dat LLFollowCamMgr::setFocusOffset(source_id, focus_offset); } } -//end Ventrella +//end Ventrella // Culled from newsim lltask.cpp @@ -5070,7 +5070,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) bool handle_special_notification_callback(const LLSD& notification, const LLSD& response) { S32 option = LLNotification::getSelectedOption(notification, response); - + if (0 == option) { // set the preference to the maturity of the region we're calling @@ -5079,7 +5079,7 @@ bool handle_special_notification_callback(const LLSD& notification, const LLSD& gAgent.sendMaturityPreferenceToServer(preferredMaturity); } - + return false; } @@ -5088,10 +5088,10 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock) { int regionAccess = llsdBlock["_region_access"].asInteger(); llsdBlock["REGIONMATURITY"] = LLViewerRegion::accessToString(regionAccess); - + // we're going to throw the LLSD in there in case anyone ever wants to use it LLNotifications::instance().add(notificationID+"_Notify", llsdBlock); - + if (regionAccess == SIM_ACCESS_MATURE) { if (gAgent.isTeen()) @@ -5140,7 +5140,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) llwarns << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << llendl; } } - + if ( (notificationID == "RegionEntryAccessBlocked") || (notificationID == "LandClaimAccessBlocked") || @@ -5151,32 +5151,32 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) (Commented so a grep will find the notification strings, since we construct them on the fly; if you add additional notifications, please update the comment.) - + Could throw any of the following notifications: - + RegionEntryAccessBlocked RegionEntryAccessBlocked_Notify RegionEntryAccessBlocked_Change RegionEntryAccessBlocked_KB - LandClaimAccessBlocked - LandClaimAccessBlocked_Notify - LandClaimAccessBlocked_Change - LandClaimAccessBlocked_KB + LandClaimAccessBlocked + LandClaimAccessBlocked_Notify + LandClaimAccessBlocked_Change + LandClaimAccessBlocked_KB LandBuyAccessBlocked LandBuyAccessBlocked_Notify LandBuyAccessBlocked_Change LandBuyAccessBlocked_KB - - -----------------------------------------------------------------------*/ + + -----------------------------------------------------------------------*/ if (handle_special_notification(notificationID, llsdBlock)) { return true; } } - + LLNotifications::instance().add(notificationID, llsdBlock); return true; - } + } return false; } @@ -5186,7 +5186,7 @@ void process_agent_alert_message(LLMessageSystem* msgsystem, void** user_data) // make sure the cursor is back to the usual default since the // alert is probably due to some kind of error. gViewerWindow->getWindow()->resetBusyCount(); - + if (!attempt_standard_notification(msgsystem)) { BOOL modal = FALSE; @@ -5207,7 +5207,7 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data) // make sure the cursor is back to the usual default since the // alert is probably due to some kind of error. gViewerWindow->getWindow()->resetBusyCount(); - + if (!attempt_standard_notification(msgsystem)) { BOOL modal = FALSE; @@ -5336,7 +5336,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use { if (gAgent.inPrelude()) { - // In prelude, bumping is OK. This dialog is rather confusing to + // In prelude, bumping is OK. This dialog is rather confusing to // newbies, so we don't show it. Drop the packet on the floor. return; } @@ -5393,7 +5393,7 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data) // alert is probably due to some kind of error. gViewerWindow->getWindow()->resetBusyCount(); BOOL b_frozen; - + msgsystem->getBOOL("FrozenData", "Data", b_frozen); // TODO: make being frozen change view @@ -5412,8 +5412,8 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/) S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is " - << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is " + << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() << upload_cost << LL_ENDL; LLFloaterImagePreview::setUploadAmount(upload_cost); @@ -5436,13 +5436,13 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp { // check to see if the person we are asking - // "'[OBJECTNAME]', an object owned by '[OWNERNAME]', - // located in [REGIONNAME] at [REGIONPOS], + // "'[OBJECTNAME]', an object owned by '[OWNERNAME]', + // located in [REGIONNAME] at [REGIONPOS], // has been permission to: [PERMISSIONS]." LLUIString notice(LLFloaterChat::getInstance()->getString(granted ? "ScriptQuestionCautionChatGranted" : "ScriptQuestionCautionChatDenied")); - // always include the object name and owner name + // always include the object name and owner name notice.setArg("[OBJECTNAME]", notification["payload"]["object_name"].asString()); notice.setArg("[OWNERNAME]", notification["payload"]["owner_name"].asString()); @@ -5454,7 +5454,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp { // found the viewerobject, get it's position in its region LLVector3 objpos(viewobj->getPosition()); - + // try to lookup the name of the region the object is in LLViewerRegion* viewregion = viewobj->getRegion(); if (viewregion) @@ -5481,7 +5481,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp notice.setArg("[REGIONPOS]", "(unknown position)"); } - // check each permission that was requested, and list each + // check each permission that was requested, and list each // permission that has been flagged as a caution permission BOOL caution = FALSE; S32 count = 0; @@ -5533,7 +5533,7 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) { new_questions = 0; allowed = FALSE; - } + } LLUUID task_id = notification["payload"]["task_id"].asUUID(); LLUUID item_id = notification["payload"]["item_id"].asUUID(); @@ -5625,10 +5625,10 @@ void process_script_question(LLMessageSystem *msg, void **user_data) { throttle_name = taskid.getString(); } - + // don't display permission requests if this object is muted if (LLMuteList::getInstance()->isMuted(taskid)) return; - + // throttle excessive requests from any specific user's scripts typedef LLKeyThrottle LLStringThrottle; static LLStringThrottle question_throttle( LLREQUEST_PERMISSION_THROTTLE_LIMIT, LLREQUEST_PERMISSION_THROTTLE_INTERVAL ); @@ -5665,7 +5665,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data) { LLStringUtil::format_map_t args; args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); - + count++; script_question += " " + LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i], args) + "\n"; @@ -6018,7 +6018,7 @@ void send_group_notice(const LLUUID& group_id, { bucket_to_send = (U8*) EMPTY_BINARY_BUCKET; } - + send_improved_im( group_id, @@ -6083,7 +6083,7 @@ void handle_lure(const LLUUID& invitee) } // Prompt for a message to the invited user. -void handle_lure(LLDynamicArray& ids) +void handle_lure(LLDynamicArray& ids) { LLSD edit_args; // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) @@ -6128,7 +6128,7 @@ void send_improved_im(const LLUUID& to_id, U8 offline, EInstantMessage dialog, const LLUUID& id, - U32 timestamp, + U32 timestamp, const U8* binary_bucket, S32 binary_bucket_size) { @@ -6187,7 +6187,7 @@ void process_user_info_reply(LLMessageSystem* msg, void**) LL_WARNS("Messaging") << "process_user_info_reply - " << "wrong agent id." << LL_ENDL; } - + BOOL im_via_email; msg->getBOOLFast(_PREHASH_UserData, _PREHASH_IMViaEMail, im_via_email); std::string email; @@ -6241,7 +6241,7 @@ void process_script_dialog(LLMessageSystem* msg, void**) LLSD payload; - std::string message; + std::string message; std::string first_name; std::string last_name; std::string title; @@ -6261,7 +6261,7 @@ void process_script_dialog(LLMessageSystem* msg, void**) { std::vector mutes = LLMuteList::getInstance()->getMutes(); for (U32 i = 0; i < mutes.size(); i++) - { + { //this is almost like saying (mutes[i].mType != LLMute::Object), but more verbose ... -Kaku if ( ((mutes[i].mType == LLMute::AGENT) @@ -6524,7 +6524,7 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) // remove above two lines and replace with below line // to re-enable parcel browser for llMapDestination() // LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE); - + } void process_covenant_reply(LLMessageSystem* msg, void**) @@ -6557,7 +6557,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLFloaterBuyLand::updateLastModified(last_modified); gCacheName->getName(estate_owner_id, callbackCacheEstateOwnerName); - + // load the actual covenant asset data const BOOL high_priority = TRUE; if (covenant_id.notNull()) @@ -6595,7 +6595,7 @@ void callbackCacheEstateOwnerName(const LLUUID& id, BOOL is_group, void*) { std::string name; - + if (id.isNull()) { name = "(none)"; @@ -6619,9 +6619,9 @@ void onCovenantLoadComplete(LLVFS *vfs, if(0 == status) { LLVFile file(vfs, asset_uuid, type, LLVFile::READ); - + S32 file_length = file.getSize(); - + char* buffer = new char[file_length+1]; if (buffer == NULL) { @@ -6630,10 +6630,10 @@ void onCovenantLoadComplete(LLVFS *vfs, } file.read((U8*)buffer, file_length); /* Flawfinder: ignore */ - + // put a EOS at the end buffer[file_length] = 0; - + if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) { LLViewerTextEditor* editor = @@ -6662,7 +6662,7 @@ void onCovenantLoadComplete(LLVFS *vfs, else { LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); - + if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { @@ -6676,7 +6676,7 @@ void onCovenantLoadComplete(LLVFS *vfs, { covenant_text = "Unable to load estate covenant at this time."; } - + LL_WARNS("Messaging") << "Problem loading notecard: " << status << LL_ENDL; } LLPanelEstateCovenant::updateCovenantText(covenant_text, asset_uuid); @@ -6694,7 +6694,7 @@ void process_feature_disabled_message(LLMessageSystem* msg, void**) msg->getStringFast(_PREHASH_FailureInfo,_PREHASH_ErrorMessage, messageText,0); msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_AgentID,agentID); msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_TransactionID,transactionID); - + LL_WARNS("Messaging") << "Blacklisted Feature Response:" << messageText << LL_ENDL; } diff --git a/linden/indra/newview/wlfloatermanager.cpp b/linden/indra/newview/wlfloatermanager.cpp index 63abe14..0b81d7e 100644 --- a/linden/indra/newview/wlfloatermanager.cpp +++ b/linden/indra/newview/wlfloatermanager.cpp @@ -1,11 +1,11 @@ -/** +/** * @file wlfloaterwindlightsend.cpp * @brief WLFloaterWindLightSend class definition * * $LicenseInfo:firstyear=2007&license=viewergpl$ -* +* * Copyright (c) 2007-2009, Linden Research, Inc. -* +* * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 @@ -13,17 +13,17 @@ * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 -* +* * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or * online at * http://secondlifegrid.net/programs/open_source/licensing/flossexception -* +* * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, * and agree to abide by those obligations. -* +* * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. @@ -75,12 +75,12 @@ #undef max WLFloaterManager* WLFloaterManager::sWindLight; -std::map WLFloaterManager::mWLParamList; -std::map WLFloaterManager::mWaterParamList; -std::map WLFloaterManager::mWaterNormalParamList; -std::map WLFloaterManager::mMinAltParamList; -std::map WLFloaterManager::mMaxAltParamList; -std::map WLFloaterManager::mFadeParamList; +std::map WLFloaterManager::mWLParamList; +std::map WLFloaterManager::mWaterParamList; +std::map WLFloaterManager::mWaterNormalParamList; +std::map WLFloaterManager::mMinAltParamList; +std::map WLFloaterManager::mMaxAltParamList; +std::map WLFloaterManager::mFadeParamList; WLFloaterManager::WLFloaterManager() : LLFloater(std::string("windlight manager floater")) { @@ -233,10 +233,10 @@ void WLFloaterManager::onSetToCurrent(void* userData) if(name == "(Region Settings)") { type = 0; - } - + } + if(mSky != NULL && mWater != NULL && mWaterNormal != NULL) - WLFloaterWindLightSend::SendSettings(false, type, NULL, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal); + WLFloaterWindLightSend::SendSettings(false, type, NULL, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal); } void WLFloaterManager::onRemove(void* userData) { @@ -258,7 +258,7 @@ void WLFloaterManager::onRemove(void* userData) } if(mSky != NULL && mWater != NULL && mWaterNormal != NULL) - WLFloaterWindLightSend::SendSettings(true, type, false, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal); + WLFloaterWindLightSend::SendSettings(true, type, false, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal); } @@ -269,13 +269,12 @@ void WLFloaterManager::UpdateFloater() LLComboBox* comboBox = mgr->getChild("WLSettingsCombo"); comboBox->clear(); comboBox->removeall(); - std::map::iterator mIt = + std::map::iterator mIt = WLFloaterManager::instance()->mWLParamList.begin(); - for(; mIt != WLFloaterManager::instance()->mWLParamList.end(); mIt++) + for(; mIt != WLFloaterManager::instance()->mWLParamList.end(); mIt++) { comboBox->add(mIt->first); } //Reorder them comboBox->sortByName(); } - diff --git a/linden/indra/newview/wlretrievesettings.cpp b/linden/indra/newview/wlretrievesettings.cpp index afa84f2..3fd3084 100644 --- a/linden/indra/newview/wlretrievesettings.cpp +++ b/linden/indra/newview/wlretrievesettings.cpp @@ -1,11 +1,11 @@ -/** +/** * @file wlfloaterwindlightsend.cpp * @brief WLFloaterWindLightSend class definition * * $LicenseInfo:firstyear=2007&license=viewergpl$ -* +* * Copyright (c) 2007-2009, Linden Research, Inc. -* +* * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 @@ -13,17 +13,17 @@ * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 -* +* * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or * online at * http://secondlifegrid.net/programs/open_source/licensing/flossexception -* +* * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, * and agree to abide by those obligations. -* +* * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. @@ -93,7 +93,7 @@ void retrieveWindlightSettings::result(const LLSD& content) for(LLSD::array_const_iterator wls = content["WindLight"].beginArray(); wls != content["WindLight"].endArray(); ++wls) - { + { LLSD windLightLLSD = *wls; LLWaterParamSet* mWater; LLWLParamSet* mSky; @@ -235,4 +235,4 @@ void retrieveWindlightSettings::error(U32 status, const std::string& reason) { LL_INFOS("Inventory") << "retrieveWindlightSettings::error " << status << ": " << reason << LL_ENDL; -} \ No newline at end of file +} -- cgit v1.1