diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-06-26 00:39:00 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-06-26 00:39:00 +0000 |
commit | 25c10ed028da5c547b11f1f461916897272b0e6d (patch) | |
tree | 350a5858f8970b6e28b2dc395625d74d8bd597b2 /indra/newview/llpanelpick.cpp | |
parent | 6dd125d375b38455997a0c4b8747659f4c2351aa (diff) |
QAR-628 merge string-cleanup-5 -r 90476:90508 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/newview/llpanelpick.cpp')
-rw-r--r-- | indra/newview/llpanelpick.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp index 674515273b..9bd118fa1d 100644 --- a/indra/newview/llpanelpick.cpp +++ b/indra/newview/llpanelpick.cpp @@ -63,7 +63,7 @@ std::list<LLPanelPick*> LLPanelPick::sAllPanels; LLPanelPick::LLPanelPick(BOOL top_pick) -: LLPanel("Top Picks Panel"), +: LLPanel(std::string("Top Picks Panel")), mTopPick(top_pick), mPickID(), mCreatorID(), @@ -292,33 +292,33 @@ void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **) LLUUID parcel_id; msg->getUUID("Data", "ParcelID", parcel_id); - char name[DB_PARCEL_NAME_SIZE]; /*Flawfinder: ignore*/ - msg->getString("Data", "Name", DB_PARCEL_NAME_SIZE, name); + std::string name; + msg->getString("Data", "Name", name); - char desc[DB_PICK_DESC_SIZE]; /*Flawfinder: ignore*/ - msg->getString("Data", "Desc", DB_PICK_DESC_SIZE, desc); + std::string desc; + msg->getString("Data", "Desc", desc); LLUUID snapshot_id; msg->getUUID("Data", "SnapshotID", snapshot_id); // "Location text" is actually the owner name, the original // name that owner gave the parcel, and the location. - char buffer[256]; /*Flawfinder: ignore*/ - LLString location_text; - - msg->getString("Data", "User", 256, buffer); - location_text.assign(buffer); + std::string location_text; + msg->getString("Data", "User", location_text); location_text.append(", "); - msg->getString("Data", "OriginalName", 256, buffer); - if (buffer[0] != '\0') + std::string original_name; + msg->getString("Data", "OriginalName", original_name); + if (!original_name.empty()) { - location_text.append(buffer); + location_text.append(original_name); location_text.append(", "); } - char sim_name[256]; /*Flawfinder: ignore*/ - msg->getString("Data", "SimName", 256, sim_name); + std::string sim_name; + msg->getString("Data", "SimName", sim_name); + location_text.append(sim_name); + location_text.append(" "); LLVector3d pos_global; msg->getVector3d("Data", "PosGlobal", pos_global); @@ -327,7 +327,7 @@ void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **) S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS; S32 region_z = llround((F32)pos_global.mdV[VZ]); - location_text.append(llformat("%s (%d, %d, %d)", sim_name, region_x, region_y, region_z)); + location_text.append(llformat("(%d, %d, %d)", region_x, region_y, region_z)); S32 sort_order; msg->getS32("Data", "SortOrder", sort_order); @@ -355,8 +355,8 @@ void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **) self->mPosGlobal = pos_global; // Update UI controls - self->mNameEditor->setText(LLString(name)); - self->mDescEditor->setText(LLString(desc)); + self->mNameEditor->setText(std::string(name)); + self->mDescEditor->setText(std::string(desc)); self->mSnapshotCtrl->setImageAssetID(snapshot_id); self->mLocationEditor->setText(location_text); self->mEnabledCheck->set(enabled); @@ -448,7 +448,7 @@ void LLPanelPick::onClickMap(void* data) void LLPanelPick::onClickLandmark(void* data) { LLPanelPick* self = (LLPanelPick*)data; - create_landmark(self->mNameEditor->getText().c_str(), "", self->mPosGlobal); + create_landmark(self->mNameEditor->getText(), "", self->mPosGlobal); } */ @@ -460,7 +460,7 @@ void LLPanelPick::onClickSet(void* data) // Save location for later. self->mPosGlobal = gAgent.getPositionGlobal(); - LLString location_text; + std::string location_text; location_text.assign("(will update after save)"); location_text.append(", "); @@ -500,7 +500,7 @@ void LLPanelPick::onCommitAny(LLUICtrl* ctrl, void* data) /*if (self->mTopPick) { LLPanelDirPicks* panel = (LLPanelDirPicks*)self->getParent(); - panel->renamePick(self->mPickID, self->mNameEditor->getText().c_str()); + panel->renamePick(self->mPickID, self->mNameEditor->getText()); } else {*/ |