diff options
Diffstat (limited to 'linden/indra/newview/llpanelclassified.cpp')
-rw-r--r-- | linden/indra/newview/llpanelclassified.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp index 11120e0..7a2542d 100644 --- a/linden/indra/newview/llpanelclassified.cpp +++ b/linden/indra/newview/llpanelclassified.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2005-2007, Linden Research, Inc. | 5 | * Copyright (c) 2005-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -57,7 +58,7 @@ | |||
57 | #include "llviewerwindow.h" | 58 | #include "llviewerwindow.h" |
58 | #include "llworldmap.h" | 59 | #include "llworldmap.h" |
59 | #include "llfloaterworldmap.h" | 60 | #include "llfloaterworldmap.h" |
60 | #include "llviewermessage.h" // send_generic_message | 61 | #include "llviewergenericmessage.h" // send_generic_message |
61 | #include "llviewerwindow.h" // for window width, height | 62 | #include "llviewerwindow.h" // for window width, height |
62 | 63 | ||
63 | const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$ | 64 | const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$ |
@@ -91,7 +92,7 @@ public: | |||
91 | static LLDispatchClassifiedClickThrough sClassifiedClickThrough; | 92 | static LLDispatchClassifiedClickThrough sClassifiedClickThrough; |
92 | 93 | ||
93 | //static | 94 | //static |
94 | LLLinkedList<LLPanelClassified> LLPanelClassified::sAllPanels; | 95 | std::list<LLPanelClassified*> LLPanelClassified::sAllPanels; |
95 | 96 | ||
96 | LLPanelClassified::LLPanelClassified(BOOL in_finder) | 97 | LLPanelClassified::LLPanelClassified(BOOL in_finder) |
97 | : LLPanel("Classified Panel"), | 98 | : LLPanel("Classified Panel"), |
@@ -118,7 +119,7 @@ LLPanelClassified::LLPanelClassified(BOOL in_finder) | |||
118 | mSetBtn(NULL), | 119 | mSetBtn(NULL), |
119 | mClickThroughText(NULL) | 120 | mClickThroughText(NULL) |
120 | { | 121 | { |
121 | sAllPanels.addData(this); | 122 | sAllPanels.push_back(this); |
122 | 123 | ||
123 | std::string classified_def_file; | 124 | std::string classified_def_file; |
124 | if (mInFinder) | 125 | if (mInFinder) |
@@ -138,7 +139,7 @@ LLPanelClassified::LLPanelClassified(BOOL in_finder) | |||
138 | 139 | ||
139 | LLPanelClassified::~LLPanelClassified() | 140 | LLPanelClassified::~LLPanelClassified() |
140 | { | 141 | { |
141 | sAllPanels.removeData(this); | 142 | sAllPanels.remove(this); |
142 | } | 143 | } |
143 | 144 | ||
144 | 145 | ||
@@ -319,9 +320,9 @@ void LLPanelClassified::setClickThrough(const LLUUID& classified_id, | |||
319 | S32 map, | 320 | S32 map, |
320 | S32 profile) | 321 | S32 profile) |
321 | { | 322 | { |
322 | LLPanelClassified *self = NULL; | 323 | for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter) |
323 | for (self = sAllPanels.getFirstData(); self; self = sAllPanels.getNextData()) | 324 | { |
324 | { | 325 | LLPanelClassified* self = *iter; |
325 | // For top picks, must match pick id | 326 | // For top picks, must match pick id |
326 | if (self->mClassifiedID != classified_id) | 327 | if (self->mClassifiedID != classified_id) |
327 | { | 328 | { |
@@ -477,7 +478,7 @@ void LLPanelClassified::processClassifiedInfoReply(LLMessageSystem *msg, void ** | |||
477 | S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS; | 478 | S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS; |
478 | S32 region_z = llround((F32)pos_global.mdV[VZ]); | 479 | S32 region_z = llround((F32)pos_global.mdV[VZ]); |
479 | 480 | ||
480 | snprintf(buffer, sizeof(buffer), "%s (%d, %d, %d)", sim_name, region_x, region_y, region_z); /*Flawfinder: ignore*/ | 481 | snprintf(buffer, sizeof(buffer), "%s (%d, %d, %d)", sim_name, region_x, region_y, region_z); /* Flawfinder: ignore */ |
481 | location_text.append(buffer); | 482 | location_text.append(buffer); |
482 | 483 | ||
483 | U8 flags; | 484 | U8 flags; |
@@ -502,9 +503,9 @@ void LLPanelClassified::processClassifiedInfoReply(LLMessageSystem *msg, void ** | |||
502 | msg->getS32("Data", "PriceForListing", price_for_listing); | 503 | msg->getS32("Data", "PriceForListing", price_for_listing); |
503 | 504 | ||
504 | // Look up the panel to fill in | 505 | // Look up the panel to fill in |
505 | LLPanelClassified *self = NULL; | 506 | for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter) |
506 | for (self = sAllPanels.getFirstData(); self; self = sAllPanels.getNextData()) | 507 | { |
507 | { | 508 | LLPanelClassified* self = *iter; |
508 | // For top picks, must match pick id | 509 | // For top picks, must match pick id |
509 | if (self->mClassifiedID != classified_id) | 510 | if (self->mClassifiedID != classified_id) |
510 | { | 511 | { |