summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-04-19 10:26:11 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-04-19 10:26:11 -0400
commit70a13fb3227469179ef388d95879667361ef5c03 (patch)
treeb3d8cbb5b2577563489c0be6c145913696b45b4d /indra/newview/llfavoritesbar.cpp
parentc5e338f240422cc10d0e90c514a427c9ec4a1bd3 (diff)
parent3f10caafc07b0d1a60d2b943684e87dec265f5bc (diff)
merge
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rw-r--r--indra/newview/llfavoritesbar.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index ba92c33d59..4c1e3461a5 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -75,7 +75,9 @@ public:
mPosY(0),
mPosZ(0),
mLoaded(false)
- {}
+ {
+ mHandle.bind(this);
+ }
void setLandmarkID(const LLUUID& id) { mLandmarkID = id; }
const LLUUID& getLandmarkId() const { return mLandmarkID; }
@@ -122,17 +124,21 @@ private:
if(LLLandmarkActions::getLandmarkGlobalPos(mLandmarkID, g_pos))
{
LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(g_pos,
- boost::bind(&LLLandmarkInfoGetter::landmarkNameCallback, this, _1, _2, _3, _4));
+ boost::bind(&LLLandmarkInfoGetter::landmarkNameCallback, static_cast<LLHandle<LLLandmarkInfoGetter> >(mHandle), _1, _2, _3, _4));
}
}
- void landmarkNameCallback(const std::string& name, S32 x, S32 y, S32 z)
+ static void landmarkNameCallback(LLHandle<LLLandmarkInfoGetter> handle, const std::string& name, S32 x, S32 y, S32 z)
{
- mPosX = x;
- mPosY = y;
- mPosZ = z;
- mName = name;
- mLoaded = true;
+ LLLandmarkInfoGetter* getter = handle.get();
+ if (getter)
+ {
+ getter->mPosX = x;
+ getter->mPosY = y;
+ getter->mPosZ = z;
+ getter->mName = name;
+ getter->mLoaded = true;
+ }
}
LLUUID mLandmarkID;
@@ -141,6 +147,7 @@ private:
S32 mPosY;
S32 mPosZ;
bool mLoaded;
+ LLRootHandle<LLLandmarkInfoGetter> mHandle;
};
/**