summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-04-16 13:31:16 -0700
committerRichard Linden <none@none>2010-04-16 13:31:16 -0700
commit5340217b278032f29eb1b759ed950b5d2374c75b (patch)
tree7354f25db5b0143880df1afb59c4ec4057a4b858
parent04cfcd1edca32090548960135e7de13b001aa908 (diff)
parent9b6da49ef5d5673015dea0744bbe1adeb9380f52 (diff)
merge
-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 bf7c735488..959395ff82 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;
};
/**