aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterlandholdings.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llfloaterlandholdings.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llfloaterlandholdings.cpp')
-rw-r--r--linden/indra/newview/llfloaterlandholdings.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/linden/indra/newview/llfloaterlandholdings.cpp b/linden/indra/newview/llfloaterlandholdings.cpp
index 01bad70..6411a97 100644
--- a/linden/indra/newview/llfloaterlandholdings.cpp
+++ b/linden/indra/newview/llfloaterlandholdings.cpp
@@ -82,7 +82,7 @@ void LLFloaterLandHoldings::show(void*)
82 82
83// protected 83// protected
84LLFloaterLandHoldings::LLFloaterLandHoldings() 84LLFloaterLandHoldings::LLFloaterLandHoldings()
85: LLFloater("land holdings floater"), 85: LLFloater(std::string("land holdings floater")),
86 mActualArea(0), 86 mActualArea(0),
87 mBillableArea(0), 87 mBillableArea(0),
88 mFirstPacketReceived(FALSE), 88 mFirstPacketReceived(FALSE),
@@ -183,28 +183,28 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**)
183 } 183 }
184 184
185 LLUUID owner_id; 185 LLUUID owner_id;
186 char name[MAX_STRING]; /* Flawfinder: ignore */ 186 std::string name;
187 char desc[MAX_STRING]; /* Flawfinder: ignore */ 187 std::string desc;
188 S32 actual_area; 188 S32 actual_area;
189 S32 billable_area; 189 S32 billable_area;
190 U8 flags; 190 U8 flags;
191 F32 global_x; 191 F32 global_x;
192 F32 global_y; 192 F32 global_y;
193 char sim_name[MAX_STRING]; /* Flawfinder: ignore */ 193 std::string sim_name;
194 194
195 S32 i; 195 S32 i;
196 S32 count = msg->getNumberOfBlocks("QueryData"); 196 S32 count = msg->getNumberOfBlocks("QueryData");
197 for (i = 0; i < count; i++) 197 for (i = 0; i < count; i++)
198 { 198 {
199 msg->getUUID("QueryData", "OwnerID", owner_id, i); 199 msg->getUUID("QueryData", "OwnerID", owner_id, i);
200 msg->getString("QueryData", "Name", MAX_STRING, name, i); 200 msg->getString("QueryData", "Name", name, i);
201 msg->getString("QueryData", "Desc", MAX_STRING, desc, i); 201 msg->getString("QueryData", "Desc", desc, i);
202 msg->getS32("QueryData", "ActualArea", actual_area, i); 202 msg->getS32("QueryData", "ActualArea", actual_area, i);
203 msg->getS32("QueryData", "BillableArea", billable_area, i); 203 msg->getS32("QueryData", "BillableArea", billable_area, i);
204 msg->getU8("QueryData", "Flags", flags, i); 204 msg->getU8("QueryData", "Flags", flags, i);
205 msg->getF32("QueryData", "GlobalX", global_x, i); 205 msg->getF32("QueryData", "GlobalX", global_x, i);
206 msg->getF32("QueryData", "GlobalY", global_y, i); 206 msg->getF32("QueryData", "GlobalY", global_y, i);
207 msg->getString("QueryData", "SimName", MAX_STRING, sim_name, i); 207 msg->getString("QueryData", "SimName", sim_name, i);
208 208
209 self->mActualArea += actual_area; 209 self->mActualArea += actual_area;
210 self->mBillableArea += billable_area; 210 self->mBillableArea += billable_area;
@@ -212,21 +212,21 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**)
212 S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; 212 S32 region_x = llround(global_x) % REGION_WIDTH_UNITS;
213 S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; 213 S32 region_y = llround(global_y) % REGION_WIDTH_UNITS;
214 214
215 char location[MAX_STRING]; /* Flawfinder: ignore */ 215 std::string location;
216 snprintf(location, MAX_STRING, "%s (%d, %d)", sim_name, region_x, region_y); /* Flawfinder: ignore */ 216 location = llformat("%s (%d, %d)", sim_name.c_str(), region_x, region_y);
217 217
218 char area[MAX_STRING]; /* Flawfinder: ignore */ 218 std::string area;
219 if(billable_area == actual_area) 219 if(billable_area == actual_area)
220 { 220 {
221 snprintf(area, MAX_STRING, "%d", billable_area); /* Flawfinder: ignore */ 221 area = llformat("%d", billable_area);
222 } 222 }
223 else 223 else
224 { 224 {
225 snprintf(area, MAX_STRING, "%d / %d", billable_area, actual_area); /* Flawfinder: ignore */ 225 area = llformat("%d / %d", billable_area, actual_area);
226 } 226 }
227 227
228 char hidden[MAX_STRING]; /* Flawfinder: ignore */ 228 std::string hidden;
229 snprintf(hidden, MAX_STRING, "%f %f", global_x, global_y); /* Flawfinder: ignore */ 229 hidden = llformat("%f %f", global_x, global_y);
230 230
231 LLSD element; 231 LLSD element;
232 element["columns"][0]["column"] = "name"; 232 element["columns"][0]["column"] = "name";
@@ -256,7 +256,7 @@ void LLFloaterLandHoldings::buttonCore(S32 which)
256 S32 index = list->getFirstSelectedIndex(); 256 S32 index = list->getFirstSelectedIndex();
257 if (index < 0) return; 257 if (index < 0) return;
258 258
259 LLString location = list->getSelectedItemLabel(3); 259 std::string location = list->getSelectedItemLabel(3);
260 260
261 F32 global_x = 0.f; 261 F32 global_x = 0.f;
262 F32 global_y = 0.f; 262 F32 global_y = 0.f;