Clean up useless code

This commit is contained in:
Liru Færs
2020-01-17 23:35:55 -05:00
parent 450afff50b
commit 2ffc99aecf
2 changed files with 7 additions and 48 deletions

View File

@@ -63,10 +63,6 @@
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
// LLPreviewLandmark // LLPreviewLandmark
// static
LLPreviewLandmarkList LLPreviewLandmark::sOrderedInstances;
LLPreviewLandmark::LLPreviewLandmark(const std::string& name, LLPreviewLandmark::LLPreviewLandmark(const std::string& name,
const LLRect& rect, const LLRect& rect,
const std::string& title, const std::string& title,
@@ -112,18 +108,10 @@ LLPreviewLandmark::LLPreviewLandmark(const std::string& name,
translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop); translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
} }
*/ */
LLPreviewLandmark::sOrderedInstances.push_back( this );
} }
LLPreviewLandmark::~LLPreviewLandmark() LLPreviewLandmark::~LLPreviewLandmark()
{ {
LLPreviewLandmarkList::iterator this_itr;
this_itr = std::find(LLPreviewLandmark::sOrderedInstances.begin(),
LLPreviewLandmark::sOrderedInstances.end(), this);
if (this_itr != LLPreviewLandmark::sOrderedInstances.end())
{
LLPreviewLandmark::sOrderedInstances.erase(this_itr);
}
} }

View File

@@ -33,72 +33,43 @@
#ifndef LL_LLPREVIEWLANDMARK_H #ifndef LL_LLPREVIEWLANDMARK_H
#define LL_LLPREVIEWLANDMARK_H #define LL_LLPREVIEWLANDMARK_H
#include <deque>
#include "lllandmark.h"
#include "llfloater.h"
#include "llmap.h"
#include "llstring.h"
#include "lluuid.h"
#include "v3dmath.h"
#include "v4coloru.h"
#include "llhudtext.h"
#include "llpreview.h" #include "llpreview.h"
class LLIconCtrl; class LLIconCtrl;
class LLInventoryItem;
class LLLandmarkList;
class LLLineEditor;
class LLMessageSystem;
class LLPreviewLandmark;
class LLPanelPlace; class LLPanelPlace;
class LLLandmark;
const S32 PREVIEW_LANDMARK_NUM_COLORS = 6; class LLPreviewLandmark final : public LLPreview
typedef std::deque< LLPreviewLandmark* > LLPreviewLandmarkList;
class LLPreviewLandmark : public LLPreview
{ {
public: public:
LLPreviewLandmark(const std::string& name, const LLRect& rect, const std::string& title, LLPreviewLandmark(const std::string& name, const LLRect& rect, const std::string& title,
const LLUUID& item_uuid, const LLUUID& item_uuid,
BOOL show_keep_discard = FALSE, BOOL show_keep_discard = FALSE,
LLViewerInventoryItem* inv_item = NULL); LLViewerInventoryItem* inv_item = nullptr);
virtual ~LLPreviewLandmark(); virtual ~LLPreviewLandmark();
/*virtual*/ void draw(); /*virtual*/ void draw() override;
const std::string& getName() const; const std::string& getName() const;
const LLColor4& getMarkerColor() const; const LLColor4& getMarkerColor() const;
LLVector3d getPositionGlobal() const; LLVector3d getPositionGlobal() const;
//static S32 getNumInstances() { return LLPreviewLandmark::sOrderedInstances.getLength(); }
//static const LLPreviewLandmark* getFirst() { return LLPreviewLandmark::sOrderedInstances.getFirstData(); }
//static const LLPreviewLandmark* getNext() { return LLPreviewLandmark::sOrderedInstances.getNextData(); }
static void* createPlaceDetail(void* userdata); static void* createPlaceDetail(void* userdata);
/*virtual*/ void loadAsset(); /*virtual*/ void loadAsset() override;
/*virtual*/ EAssetStatus getAssetStatus(); /*virtual*/ EAssetStatus getAssetStatus() override;
protected: protected:
void getDegreesAndDist(F32* degrees, F64* horiz_dist, F64* vert_dist) const; void getDegreesAndDist(F32* degrees, F64* horiz_dist, F64* vert_dist) const;
virtual const char *getTitleName() const { return "Landmark"; } const char *getTitleName() const override { return "Landmark"; }
private: private:
// void renderBeacon();
// LLPointer<LLHUDText> mBeaconText;
LLIconCtrl* mIconLandmark; LLIconCtrl* mIconLandmark;
LLPanelPlace* mPlacePanel; LLPanelPlace* mPlacePanel;
LLLandmark* mLandmark; LLLandmark* mLandmark;
LLColor4 mMarkerColor; LLColor4 mMarkerColor;
static LLPreviewLandmarkList sOrderedInstances;
}; };
#endif #endif