summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterreporter.cpp
diff options
context:
space:
mode:
authorDenis Serdjuk <dserduk@productengine.com>2009-12-28 17:44:54 +0200
committerDenis Serdjuk <dserduk@productengine.com>2009-12-28 17:44:54 +0200
commitd89793616e32cace99b5b76e47d51d141b20c7f2 (patch)
treef03c883f185d77951699d71c06b52c9103649f4e /indra/newview/llfloaterreporter.cpp
parent79fba14bd4ba88dfe71546f5f679ed79fdeff66a (diff)
implemented minor task EXT-3454 Code improvements: Replace old-style calback with boost::function in the LLFloaterAvatarPicker
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llfloaterreporter.cpp')
-rw-r--r--indra/newview/llfloaterreporter.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index c0825dc694..e0f2fca580 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -172,7 +172,7 @@ BOOL LLFloaterReporter::postBuild()
std::string("tool_face_active.tga") );
childSetAction("pick_btn", onClickObjPicker, this);
- childSetAction("select_abuser", onClickSelectAbuser, this);
+ childSetAction("select_abuser", boost::bind(&LLFloaterReporter::onClickSelectAbuser, this));
childSetAction("send_btn", onClickSend, this);
childSetAction("cancel_btn", onClickCancel, this);
@@ -306,26 +306,20 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
}
-// static
-void LLFloaterReporter::onClickSelectAbuser(void *userdata)
+void LLFloaterReporter::onClickSelectAbuser()
{
- LLFloaterReporter *self = (LLFloaterReporter *)userdata;
-
- gFloaterView->getParentFloater(self)->addDependentFloater(LLFloaterAvatarPicker::show(callbackAvatarID, userdata, FALSE, TRUE ));
+ gFloaterView->getParentFloater(this)->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE ));
}
-// static
-void LLFloaterReporter::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data)
+void LLFloaterReporter::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
{
- LLFloaterReporter* self = (LLFloaterReporter*) data;
-
if (ids.empty() || names.empty()) return;
- self->childSetText("abuser_name_edit", names[0] );
+ childSetText("abuser_name_edit", names[0] );
- self->mAbuserID = ids[0];
+ mAbuserID = ids[0];
- self->refresh();
+ refresh();
}