summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-12-01 05:46:57 -0500
committerGitHub <noreply@github.com>2025-12-01 12:46:57 +0200
commitfb3f0e18a2ada57f98c3b10fab0c13fb2d504ae1 (patch)
treef554227f66bc9d54ae78bb63a816e72d5575ae82 /indra/newview
parentafb1f4d692bb593b3f200d490dd3f8fdeab8d279 (diff)
#5078 Replace boost::function with std::function
* Replace boost::function usage with std::function for easier debugging and reduced compiler warnings * Remove a few remaining instances of boost::noncopyable that were missed in tests Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagent.cpp8
-rw-r--r--indra/newview/llagent.h11
-rw-r--r--indra/newview/llagentpicksinfo.cpp2
-rw-r--r--indra/newview/llagentwearables.h4
-rw-r--r--indra/newview/llaisapi.cpp2
-rw-r--r--indra/newview/llaisapi.h4
-rw-r--r--indra/newview/llappcorehttp.cpp4
-rw-r--r--indra/newview/llappearancemgr.h2
-rw-r--r--indra/newview/llappviewer.cpp6
-rw-r--r--indra/newview/llappviewer.h2
-rw-r--r--indra/newview/llappviewerlistener.h4
-rw-r--r--indra/newview/llchiclet.h2
-rw-r--r--indra/newview/llcofwearables.h2
-rw-r--r--indra/newview/llcommandlineparser.cpp8
-rw-r--r--indra/newview/llcommandlineparser.h6
-rw-r--r--indra/newview/llcompilequeue.h2
-rw-r--r--indra/newview/lldndbutton.h2
-rw-r--r--indra/newview/llexperiencelog.cpp2
-rw-r--r--indra/newview/llfloateravatarpicker.h2
-rw-r--r--indra/newview/llfloaterbanduration.h2
-rw-r--r--indra/newview/llfloateremojipicker.h4
-rw-r--r--indra/newview/llfloaterexperiencepicker.h4
-rw-r--r--indra/newview/llfloaterexperiences.cpp2
-rw-r--r--indra/newview/llfloaterexperiences.h4
-rw-r--r--indra/newview/llfloatergroups.h3
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp2
-rw-r--r--indra/newview/llfloaterpay.cpp4
-rw-r--r--indra/newview/llfloaterpreference.cpp2
-rw-r--r--indra/newview/llfloaterregioninfo.cpp1
-rw-r--r--indra/newview/llfloatersimplesnapshot.h2
-rw-r--r--indra/newview/llfloatertos.h1
-rw-r--r--indra/newview/llfriendcard.cpp2
-rw-r--r--indra/newview/llfriendcard.h2
-rw-r--r--indra/newview/llgesturemgr.h2
-rw-r--r--indra/newview/llinventorybridge.h4
-rw-r--r--indra/newview/llinventoryfunctions.cpp2
-rw-r--r--indra/newview/llinventoryfunctions.h8
-rw-r--r--indra/newview/llinventorygallery.cpp8
-rw-r--r--indra/newview/llinventorygallery.h4
-rw-r--r--indra/newview/llinventorygallerymenu.cpp2
-rw-r--r--indra/newview/llinventorymodel.cpp4
-rw-r--r--indra/newview/llinventorymodel.h2
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.h4
-rw-r--r--indra/newview/llinventoryobserver.h2
-rw-r--r--indra/newview/llinventorypanel.cpp6
-rw-r--r--indra/newview/llinventorypanel.h7
-rw-r--r--indra/newview/lllandmarkactions.h6
-rw-r--r--indra/newview/lllandmarklist.h6
-rw-r--r--indra/newview/lllistcontextmenu.h2
-rw-r--r--indra/newview/lllocationhistory.h5
-rw-r--r--indra/newview/lllogininstance.h1
-rw-r--r--indra/newview/llmarketplacefunctions.h8
-rw-r--r--indra/newview/llmarketplacenotifications.h4
-rw-r--r--indra/newview/llmaterialeditor.cpp2
-rw-r--r--indra/newview/llmaterialmgr.cpp2
-rw-r--r--indra/newview/llmutelist.cpp2
-rw-r--r--indra/newview/llnamelistctrl.h4
-rw-r--r--indra/newview/llnotificationlistitem.h2
-rw-r--r--indra/newview/llnotificationstorage.cpp2
-rw-r--r--indra/newview/lloutfitslist.h2
-rw-r--r--indra/newview/llpanelblockedlist.cpp2
-rw-r--r--indra/newview/llpanelblockedlist.h2
-rw-r--r--indra/newview/llpaneleditwearable.cpp2
-rw-r--r--indra/newview/llpanelexperiencelisteditor.h2
-rw-r--r--indra/newview/llpanelexperiencepicker.h4
-rw-r--r--indra/newview/llpanelpeople.cpp2
-rw-r--r--indra/newview/llparticipantlist.cpp2
-rw-r--r--indra/newview/llparticipantlist.h4
-rw-r--r--indra/newview/llpathfindingmanager.cpp1
-rw-r--r--indra/newview/llpathfindingmanager.h8
-rw-r--r--indra/newview/llpathfindingnavmesh.h4
-rw-r--r--indra/newview/llpathfindingnavmeshzone.h6
-rw-r--r--indra/newview/llpathfindingobject.h4
-rw-r--r--indra/newview/llpathfindingpathtool.cpp1
-rw-r--r--indra/newview/llpathfindingpathtool.h4
-rw-r--r--indra/newview/llpopupview.cpp4
-rw-r--r--indra/newview/llpopupview.h2
-rw-r--r--indra/newview/llpostcard.h2
-rw-r--r--indra/newview/llpreviewscript.h2
-rw-r--r--indra/newview/llsetkeybinddialog.cpp2
-rw-r--r--indra/newview/llspeakers.h2
-rw-r--r--indra/newview/llsplitbutton.cpp2
-rw-r--r--indra/newview/llsyswellitem.h2
-rw-r--r--indra/newview/llteleporthistory.h4
-rw-r--r--indra/newview/llteleporthistorystorage.h2
-rw-r--r--indra/newview/lltexturectrl.cpp26
-rw-r--r--indra/newview/lltexturectrl.h12
-rw-r--r--indra/newview/lltoast.cpp2
-rw-r--r--indra/newview/lltoast.h2
-rw-r--r--indra/newview/lltoolpipette.h1
-rw-r--r--indra/newview/lltranslate.cpp6
-rw-r--r--indra/newview/lltranslate.h10
-rw-r--r--indra/newview/llviewerinput.cpp12
-rw-r--r--indra/newview/llviewerinput.h2
-rw-r--r--indra/newview/llviewerinventory.cpp4
-rw-r--r--indra/newview/llviewerinventory.h8
-rw-r--r--indra/newview/llviewermessage.h7
-rw-r--r--indra/newview/llviewerparcelaskplay.h2
-rw-r--r--indra/newview/llviewerparcelmgr.h7
-rw-r--r--indra/newview/llviewerpartsim.cpp10
-rw-r--r--indra/newview/llviewerprecompiledheaders.h1
-rw-r--r--indra/newview/llviewerregion.h8
-rw-r--r--indra/newview/llviewerwindow.cpp4
-rw-r--r--indra/newview/llviewerwindow.h5
-rw-r--r--indra/newview/llvoavatarself.cpp2
-rw-r--r--indra/newview/llvoicechannel.h2
-rw-r--r--indra/newview/llwatchdog.h2
-rw-r--r--indra/newview/llwebprofile.h2
-rw-r--r--indra/newview/llwindowlistener.cpp21
-rw-r--r--indra/newview/llwindowlistener.h4
-rw-r--r--indra/newview/llworldmap.h1
-rw-r--r--indra/newview/llworldmapmessage.cpp6
-rw-r--r--indra/newview/llworldmapmessage.h4
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp4
114 files changed, 226 insertions, 236 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index a05261e430..0d7ad0a124 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -437,8 +437,8 @@ LLAgent::LLAgent() :
mAutoPilotTargetDist(0.f),
mAutoPilotNoProgressFrameCount(0),
mAutoPilotRotationThreshold(0.f),
- mAutoPilotFinishedCallback(NULL),
- mAutoPilotCallbackData(NULL),
+ mAutoPilotFinishedCallback(nullptr),
+ mAutoPilotCallbackData(nullptr),
mMovementKeysLocked(false),
@@ -455,8 +455,8 @@ LLAgent::LLAgent() :
mVoiceConnected(false),
- mMouselookModeInSignal(NULL),
- mMouselookModeOutSignal(NULL)
+ mMouselookModeInSignal(nullptr),
+ mMouselookModeOutSignal(nullptr)
{
for (U32 i = 0; i < TOTAL_CONTROLS; i++)
{
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index c1d3c6c14b..3352890d99 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -39,9 +39,10 @@
#include "httprequest.h"
#include "llcorehttputil.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
extern const bool ANIMATE;
extern const U8 AGENT_STATE_TYPING; // Typing indication
extern const U8 AGENT_STATE_EDITING; // Set when agent has objects selected
@@ -254,7 +255,7 @@ public:
void changeParcels(); // called by LLViewerParcelMgr when we cross a parcel boundary
// Register a boost callback to be called when the agent changes parcels
- typedef boost::function<void()> parcel_changed_callback_t;
+ typedef std::function<void()> parcel_changed_callback_t;
boost::signals2::connection addParcelChangedCallback(parcel_changed_callback_t);
private:
@@ -756,7 +757,7 @@ public:
void requestEnterGodMode();
void requestLeaveGodMode();
- typedef boost::function<void (U8)> god_level_change_callback_t;
+ typedef std::function<void(U8)> god_level_change_callback_t;
typedef boost::signals2::signal<void (U8)> god_level_change_signal_t;
typedef boost::signals2::connection god_level_change_slot_t;
@@ -964,8 +965,8 @@ public:
/// Utilities for allowing the the agent sub managers to post and get via
/// HTTP using the agent's policy settings and headers.
- bool requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
- bool requestGetCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
+ bool requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
+ bool requestGetCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
LLCore::HttpRequest::policy_t getAgentPolicy() const { return mHttpPolicy; }
diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp
index 265e4060ff..4a5c037f1f 100644
--- a/indra/newview/llagentpicksinfo.cpp
+++ b/indra/newview/llagentpicksinfo.cpp
@@ -53,7 +53,7 @@ public:
LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgent.getID());
}
- typedef boost::function<void(LLAvatarData*)> server_respond_callback_t;
+ typedef std::function<void(LLAvatarData*)> server_respond_callback_t;
void setServerRespondCallback(const server_respond_callback_t& cb)
{
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 1e118ffa98..70da86805c 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -189,11 +189,11 @@ public:
// Signals
//--------------------------------------------------------------------
public:
- typedef boost::function<void()> loading_started_callback_t;
+ typedef std::function<void()> loading_started_callback_t;
typedef boost::signals2::signal<void()> loading_started_signal_t;
boost::signals2::connection addLoadingStartedCallback(loading_started_callback_t cb);
- typedef boost::function<void()> loaded_callback_t;
+ typedef std::function<void()> loaded_callback_t;
typedef boost::signals2::signal<void()> loaded_signal_t;
boost::signals2::connection addLoadedCallback(loaded_callback_t cb);
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index eecd42d427..1da1647fe8 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -950,7 +950,7 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
LL_DEBUGS("Inventory", "AIS3") << "Result: " << result << LL_ENDL;
onUpdateReceived(result, type, body);
- if (callback && !callback.empty())
+ if (callback != nullptr)
{
bool needs_callback = true;
LLUUID id(LLUUID::null);
diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h
index dd490c8268..cfc286da2e 100644
--- a/indra/newview/llaisapi.h
+++ b/indra/newview/llaisapi.h
@@ -44,7 +44,7 @@ public:
LIBRARY
} ITEM_TYPE;
- typedef boost::function<void(const LLUUID &invItem)> completion_t;
+ typedef std::function<void(const LLUUID& invItem)> completion_t;
static bool isAvailable();
static void getCapNames(LLSD& capNames);
@@ -89,7 +89,7 @@ private:
static const std::string INVENTORY_CAP_NAME;
static const std::string LIBRARY_CAP_NAME;
- typedef boost::function < LLSD (LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
+ typedef std::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
const std::string, LLSD, LLCore::HttpOptions::ptr_t, LLCore::HttpHeaders::ptr_t) > invokationFn_t;
static void EnqueueAISCommand(const std::string &procName, LLCoprocedureManager::CoProcedure_t proc);
diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp
index f4f19906f1..f3265afebd 100644
--- a/indra/newview/llappcorehttp.cpp
+++ b/indra/newview/llappcorehttp.cpp
@@ -145,8 +145,8 @@ LLAppCoreHttp::~LLAppCoreHttp()
void LLAppCoreHttp::init()
{
LLCoreHttpUtil::setPropertyMethods(
- boost::bind(&LLControlGroup::getBOOL, boost::ref(gSavedSettings), _1),
- boost::bind(&LLControlGroup::declareBOOL, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_NONDFT));
+ std::bind(&LLControlGroup::getBOOL, std::ref(gSavedSettings), std::placeholders::_1),
+ std::bind(&LLControlGroup::declareBOOL, std::ref(gSavedSettings), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, LLControlVariable::PERSIST_NONDFT));
LLCore::LLHttp::initialize();
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 0a41a91750..131b6817ed 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -235,7 +235,7 @@ public:
void setAppearanceServiceURL(const std::string& url) { mAppearanceServiceURL = url; }
std::string getAppearanceServiceURL() const;
- typedef boost::function<void ()> attachments_changed_callback_t;
+ typedef std::function<void()> attachments_changed_callback_t;
typedef boost::signals2::signal<void ()> attachments_changed_signal_t;
boost::signals2::connection setAttachmentsChangedCallback(attachments_changed_callback_t cb);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 9b16cbd3bf..a3ca25855d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1232,8 +1232,8 @@ bool LLAppViewer::init()
/// Tell the Coprocedure manager how to discover and store the pool sizes
// what I wanted
LLCoprocedureManager::getInstance()->setPropertyMethods(
- boost::bind(&LLControlGroup::getU32, boost::ref(gSavedSettings), _1),
- boost::bind(&LLControlGroup::declareU32, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_ALWAYS));
+ std::bind(&LLControlGroup::getU32, std::ref(gSavedSettings), std::placeholders::_1),
+ std::bind(&LLControlGroup::declareU32, std::ref(gSavedSettings), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, LLControlVariable::PERSIST_ALWAYS));
// TODO: consider moving proxy initialization here or LLCopocedureManager after proxy initialization, may be implement
// some other protection to make sure we don't use network before initializng proxy
@@ -4461,7 +4461,7 @@ bool LLAppViewer::initCache()
return true;
}
-void LLAppViewer::addOnIdleCallback(const boost::function<void()>& cb)
+void LLAppViewer::addOnIdleCallback(const std::function<void()>& cb)
{
gMainloopWork.post(cb);
}
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 4f2583cb16..c12b2e83ef 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -222,7 +222,7 @@ public:
return mOnLoginCompleted.connect(cb);
}
- void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle
+ void addOnIdleCallback(const std::function<void()>& cb); // add a callback to fire (once) when idle
void initGeneralThread();
void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; }
diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h
index 5ade3d3e04..8686d6522e 100644
--- a/indra/newview/llappviewerlistener.h
+++ b/indra/newview/llappviewerlistener.h
@@ -30,7 +30,7 @@
#define LL_LLAPPVIEWERLISTENER_H
#include "lleventapi.h"
-#include <boost/function.hpp>
+#include <functional>
class LLAppViewer;
class LLSD;
@@ -39,7 +39,7 @@ class LLSD;
class LLAppViewerListener: public LLEventAPI
{
public:
- typedef boost::function<LLAppViewer*(void)> LLAppViewerGetter;
+ typedef std::function<LLAppViewer*(void)> LLAppViewerGetter;
/// Bind the LLAppViewer instance to use (e.g. LLAppViewer::instance()).
LLAppViewerListener(const LLAppViewerGetter& getter);
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 5114c97beb..c19f7dc1c1 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -187,7 +187,7 @@ public:
/*virtual*/ boost::signals2::connection setLeftButtonClickCallback(
const commit_callback_t& cb);
- typedef boost::function<void (LLChiclet* ctrl, const LLSD& param)>
+ typedef std::function<void(LLChiclet* ctrl, const LLSD& param)>
chiclet_size_changed_callback_t;
/**
diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h
index 6f0e97a98b..b349f35921 100644
--- a/indra/newview/llcofwearables.h
+++ b/indra/newview/llcofwearables.h
@@ -54,7 +54,7 @@ public:
LLCOFCallbacks() {};
virtual ~LLCOFCallbacks() {};
- typedef boost::function<void ()> cof_callback_t;
+ typedef std::function<void()> cof_callback_t;
cof_callback_t mAddWearable;
cof_callback_t mMoveWearableCloser;
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index f21bae9805..dde0c18580 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -101,7 +101,7 @@ class LLCLPValue : public po::value_semantic_codecvt_helper<char>
unsigned mMinTokens;
unsigned mMaxTokens;
bool mIsComposing;
- typedef boost::function1<void, const LLCommandLineParser::token_vector_t&> notify_callback_t;
+ typedef std::function<void(const LLCommandLineParser::token_vector_t&)> notify_callback_t;
notify_callback_t mNotifyCallback;
bool mLastOption;
@@ -226,7 +226,7 @@ protected:
// LLCommandLineParser defintions
//----------------------------------------------------------------------------
void LLCommandLineParser::addOptionDesc(const std::string& option_name,
- boost::function1<void, const token_vector_t&> notify_callback,
+ std::function<void(const token_vector_t&)> notify_callback,
unsigned int token_count,
const std::string& description,
const std::string& short_name,
@@ -255,7 +255,7 @@ void LLCommandLineParser::addOptionDesc(const std::string& option_name,
value_desc,
description.c_str()));
- if(!notify_callback.empty())
+ if(notify_callback)
{
value_desc->setNotifyCallback(notify_callback);
}
@@ -693,7 +693,7 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
last_option = option_params["last_option"].asBoolean();
}
- boost::function1<void, const token_vector_t&> callback;
+ std::function<void(const token_vector_t&)> callback;
if (! option_params.has("map-to"))
{
// If this option isn't mapped to a settings variable, is it
diff --git a/indra/newview/llcommandlineparser.h b/indra/newview/llcommandlineparser.h
index 5279d02c0a..984bcfbad0 100644
--- a/indra/newview/llcommandlineparser.h
+++ b/indra/newview/llcommandlineparser.h
@@ -27,7 +27,7 @@
#ifndef LL_LLCOMMANDLINEPARSER_H
#define LL_LLCOMMANDLINEPARSER_H
-#include <boost/function/function1.hpp>
+#include <functional>
// *NOTE:Mani The following is a forward decl of
// boost::program_options::command_line_parser
@@ -58,7 +58,7 @@ public:
*/
void addOptionDesc(
const std::string& option_name,
- boost::function1<void, const token_vector_t&> notify_callback = 0,
+ std::function<void(const token_vector_t&)> notify_callback = nullptr,
unsigned int num_tokens = 0,
const std::string& description = LLStringUtil::null,
const std::string& short_name = LLStringUtil::null,
@@ -121,7 +121,7 @@ public:
* The parser_func takes an input string, and should return a
* name/value pair as the result.
*/
- typedef boost::function1<std::pair<std::string, std::string>, const std::string&> parser_func;
+ typedef std::function<std::pair<std::string, std::string>(const std::string&)> parser_func;
void setCustomParser(parser_func f) { mExtraParser = f; }
private:
diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h
index 951d4800e8..bcbb166c58 100644
--- a/indra/newview/llcompilequeue.h
+++ b/indra/newview/llcompilequeue.h
@@ -98,7 +98,7 @@ protected:
std::string mStartString;
bool mMono;
- typedef boost::function<bool(const LLPointer<LLViewerObject> &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t;
+ typedef std::function<bool(const LLPointer<LLViewerObject> &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t;
static void objectScriptProcessingQueueCoro(std::string action, LLHandle<LLFloaterScriptQueue> hfloater, object_data_list_t objectList, fnQueueAction_t func);
};
diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h
index 277c2aad69..d503b367e1 100644
--- a/indra/newview/lldndbutton.h
+++ b/indra/newview/lldndbutton.h
@@ -47,7 +47,7 @@ public:
LLDragAndDropButton(const Params& params);
- typedef boost::function<bool (
+ typedef std::function<bool (
S32 /*x*/, S32 /*y*/, MASK /*mask*/, bool /*drop*/,
EDragAndDropType /*cargo_type*/,
void* /*cargo_data*/,
diff --git a/indra/newview/llexperiencelog.cpp b/indra/newview/llexperiencelog.cpp
index ce10fba2ca..b86474c5ca 100644
--- a/indra/newview/llexperiencelog.cpp
+++ b/indra/newview/llexperiencelog.cpp
@@ -279,6 +279,6 @@ void LLExperienceLog::setNotifyNewEvent( bool val )
}
else if( val && !mNotifyConnection.connected())
{
- mNotifyConnection = addUpdateSignal(boost::function<void(LLSD&)>(LLExperienceLog::notify));
+ mNotifyConnection = addUpdateSignal(std::function<void(LLSD&)>(LLExperienceLog::notify));
}
}
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index 817427aae6..1761497f83 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -43,7 +43,7 @@ public:
typedef validate_signal_t::slot_type validate_callback_t;
// The callback function will be called with an avatar name and UUID.
- typedef boost::function<void (const uuid_vec_t&, const std::vector<LLAvatarName>&)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&, const std::vector<LLAvatarName>&)> select_callback_t;
// Call this to select an avatar.
static LLFloaterAvatarPicker* show(select_callback_t callback,
bool allow_multiple = false,
diff --git a/indra/newview/llfloaterbanduration.h b/indra/newview/llfloaterbanduration.h
index 4793b524f7..0f8944a56a 100644
--- a/indra/newview/llfloaterbanduration.h
+++ b/indra/newview/llfloaterbanduration.h
@@ -31,7 +31,7 @@
class LLFloaterBanDuration : public LLFloater
{
- typedef boost::function<void(const uuid_vec_t&, const S32 duration)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&, const S32 duration)> select_callback_t;
public:
LLFloaterBanDuration(const LLSD& target);
diff --git a/indra/newview/llfloateremojipicker.h b/indra/newview/llfloateremojipicker.h
index b807adb67d..88d288b141 100644
--- a/indra/newview/llfloateremojipicker.h
+++ b/indra/newview/llfloateremojipicker.h
@@ -40,8 +40,8 @@ class LLFloaterEmojiPicker : public LLFloater
public:
// The callback function will be called with an emoji char.
- typedef boost::function<void (llwchar)> pick_callback_t;
- typedef boost::function<void ()> close_callback_t;
+ typedef std::function<void(llwchar)> pick_callback_t;
+ typedef std::function<void ()> close_callback_t;
LLFloaterEmojiPicker(const LLSD& key);
diff --git a/indra/newview/llfloaterexperiencepicker.h b/indra/newview/llfloaterexperiencepicker.h
index 0a001478f1..d0fb611bd4 100644
--- a/indra/newview/llfloaterexperiencepicker.h
+++ b/indra/newview/llfloaterexperiencepicker.h
@@ -38,9 +38,9 @@ class LLFloaterExperiencePicker : public LLFloater
{
public:
- typedef boost::function<void (const uuid_vec_t&)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&)> select_callback_t;
// filter function for experiences, return true if the experience should be hidden.
- typedef boost::function<bool (const LLSD&)> filter_function;
+ typedef std::function<bool(const LLSD&)> filter_function;
typedef std::vector<filter_function> filter_list;
static LLFloaterExperiencePicker* show( select_callback_t callback, const LLUUID& key, bool allow_multiple, bool close_on_select, filter_list filters, LLView * frustumOrigin);
diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp
index f4cb3a04f5..999a473a49 100644
--- a/indra/newview/llfloaterexperiences.cpp
+++ b/indra/newview/llfloaterexperiences.cpp
@@ -407,7 +407,7 @@ void LLFloaterExperiences::retrieveExperienceListCoro(std::string url,
{
const LLSD& ids = result[it->first];
tab->setExperienceList(ids);
- if (!cback.empty())
+ if (cback != nullptr)
{
cback(tab, result);
}
diff --git a/indra/newview/llfloaterexperiences.h b/indra/newview/llfloaterexperiences.h
index 5852d33e0c..ec5f52d2f7 100644
--- a/indra/newview/llfloaterexperiences.h
+++ b/indra/newview/llfloaterexperiences.h
@@ -43,7 +43,7 @@ public:
static LLFloaterExperiences* findInstance();
protected:
typedef std::map<std::string, std::string> NameMap_t;
- typedef boost::function<void(LLPanelExperiences*, const LLSD&)> Callback_t;
+ typedef std::function<void(LLPanelExperiences*, const LLSD&)> Callback_t;
void clearFromRecent(const LLSD& ids);
void resizeToTabs();
@@ -65,7 +65,7 @@ protected:
const std::string &errorNotify, Callback_t cback);
private:
- typedef boost::function < LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
+ typedef std::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
const std::string, LLCore::HttpOptions::ptr_t, LLCore::HttpHeaders::ptr_t) > invokationFn_t;
static void retrieveExperienceListCoro(std::string url, LLHandle<LLFloaterExperiences> hparent,
diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h
index be6ced40bf..93a6deb0a3 100644
--- a/indra/newview/llfloatergroups.h
+++ b/indra/newview/llfloatergroups.h
@@ -40,8 +40,9 @@
#include "lluuid.h"
#include "llfloater.h"
+#include "llevent.h"
+
#include <map>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
class LLUICtrl;
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index c920a3c898..ec9458ea9b 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -87,7 +87,7 @@ public:
void addChat (LLSD& chat);
void arrangeToasts ();
- typedef boost::function<LLFloaterIMNearbyChatToastPanel* (void )> create_toast_panel_callback_t;
+ typedef std::function<LLFloaterIMNearbyChatToastPanel*(void)> create_toast_panel_callback_t;
void setCreatePanelCallback(create_toast_panel_callback_t value) { m_create_toast_panel_callback_t = value;}
void onToastDestroyed (LLToast* toast, bool app_quitting);
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index c557c25d65..d5e45c09e3 100644
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -127,8 +127,8 @@ const S32 PAY_AMOUNT_NOTIFICATION = 200;
LLFloaterPay::LLFloaterPay(const LLSD& key)
: LLFloater(key),
mCallbackData(),
- mCallback(NULL),
- mObjectNameText(NULL),
+ mCallback(nullptr),
+ mObjectNameText(nullptr),
mTargetUUID(key.asUUID()),
mTargetIsGroup(false),
mHaveName(false)
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 43731dd766..c5c1e01538 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2068,7 +2068,7 @@ class LLPanelPreference::Updater : public LLEventTimer
public:
- typedef boost::function<bool(const LLSD&)> callback_t;
+ typedef std::function<bool(const LLSD&)> callback_t;
Updater(callback_t cb, F32 period)
:LLEventTimer(period),
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 5a9b529a0c..bfce13affc 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -94,7 +94,6 @@
#include "llmeshrepository.h"
#include "llfloaterregionrestarting.h"
#include "llpanelexperiencelisteditor.h"
-#include <boost/function.hpp>
#include "llpanelexperiencepicker.h"
#include "llexperiencecache.h"
#include "llpanelexperiences.h"
diff --git a/indra/newview/llfloatersimplesnapshot.h b/indra/newview/llfloatersimplesnapshot.h
index 487e77469c..5620a15d87 100644
--- a/indra/newview/llfloatersimplesnapshot.h
+++ b/indra/newview/llfloatersimplesnapshot.h
@@ -63,7 +63,7 @@ public:
void postSave();
- typedef boost::function<void(const LLUUID& asset_id)> completion_t;
+ typedef std::function<void(const LLUUID& asset_id)> completion_t;
void setComplectionCallback(completion_t callback) { mUploadCompletionCallback = callback; }
static void uploadThumbnail(const std::string &file_path,
const LLUUID &inventory_id,
diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h
index 3bec4da58d..82a8c8ac5a 100644
--- a/indra/newview/llfloatertos.h
+++ b/indra/newview/llfloatertos.h
@@ -30,7 +30,6 @@
#include "llmodaldialog.h"
#include "llassetstorage.h"
#include "llmediactrl.h"
-#include <boost/function.hpp>
#include "lleventcoro.h"
#include "llcoros.h"
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 5300627cec..b9f19b5247 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -136,7 +136,7 @@ bool LLFindAgentCallingCard::operator()(LLInventoryCategory* cat, LLInventoryIte
class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
LLInitialFriendCardsFetch(const LLUUID& folder_id,
callback_t cb) :
diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h
index e3bd25aae7..f6c0a991bc 100644
--- a/indra/newview/llfriendcard.h
+++ b/indra/newview/llfriendcard.h
@@ -96,7 +96,7 @@ public:
void syncFriendCardsFolders();
private:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index 8db36c6d89..e10bc8bbb4 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -54,7 +54,7 @@ class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchIt
~LLGestureMgr();
public:
- typedef boost::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t;
+ typedef std::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t;
// Maps inventory item_id to gesture
typedef std::map<LLUUID, LLMultiGesture*> item_map_t;
typedef std::map<LLUUID, gesture_loaded_callback_t> callback_map_t;
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index d96adbd1d2..decb2c0528 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -239,7 +239,7 @@ public:
const LLUUID& uuid) :
LLInvFVBridge(inventory, root, uuid) {}
- typedef boost::function<void(std::string& slurl)> slurl_callback_t;
+ typedef std::function<void(std::string& slurl)> slurl_callback_t;
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void selectItem();
@@ -833,7 +833,7 @@ void rez_attachment(LLViewerInventoryItem* item,
bool move_inv_category_world_to_agent(const LLUUID& object_id,
const LLUUID& category_id,
bool drop,
- std::function<void(S32, void*, const LLMoveInv *)> callback = NULL,
+ std::function<void(S32, void*, const LLMoveInv *)> callback = nullptr,
void* user_data = NULL,
LLInventoryFilter* filter = NULL);
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index e6b33453d5..3cc57e851f 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1758,7 +1758,7 @@ bool sort_alpha(const LLViewerInventoryCategory* cat1, const LLViewerInventoryCa
// The only inventory changes that are done is to move and sort folders containing no-copy items to stock folders.
// @pending_callbacks - how many callbacks we are waiting for, must be inited before use
// @result - true if things validate, false if issues are raised, must be inited before use
-typedef boost::function<void(S32 pending_callbacks, bool result)> validation_result_callback_t;
+typedef std::function<void(S32 pending_callbacks, bool result)> validation_result_callback_t;
void validate_marketplacelistings(
LLInventoryCategory* cat,
validation_result_callback_t cb_result,
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 77a2a18877..eba67be313 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -151,13 +151,13 @@ class LLMarketplaceValidator: public LLSingleton<LLMarketplaceValidator>
LOG_CLASS(LLMarketplaceValidator);
public:
- typedef boost::function<void(std::string& validation_message, S32 depth, LLError::ELevel log_level)> validation_msg_callback_t;
- typedef boost::function<void(bool result)> validation_done_callback_t;
+ typedef std::function<void(std::string& validation_message, S32 depth, LLError::ELevel log_level)> validation_msg_callback_t;
+ typedef std::function<void(bool result)> validation_done_callback_t;
void validateMarketplaceListings(
const LLUUID &category_id,
- validation_done_callback_t cb_done = NULL,
- validation_msg_callback_t cb_msg = NULL,
+ validation_done_callback_t cb_done = nullptr,
+ validation_msg_callback_t cb_msg = nullptr,
bool fix_hierarchy = true,
S32 depth = -1);
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 97c80cc01d..f77088e0b1 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -1816,8 +1816,8 @@ void LLInventoryGallery::paste(const LLUUID& dest,
const LLUUID& marketplacelistings_id)
{
LLHandle<LLPanel> handle = getHandle();
- std::function <void(const LLUUID)> on_copy_callback = NULL;
- LLPointer<LLInventoryCallback> cb = NULL;
+ std::function<void(const LLUUID)> on_copy_callback = nullptr;
+ LLPointer<LLInventoryCallback> cb = nullptr;
if (dest == mFolderID)
{
on_copy_callback = [handle](const LLUUID& inv_item)
@@ -3586,8 +3586,8 @@ bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop,
move_inv->mObjectID = inv_item->getParentUUID();
std::pair<LLUUID, LLUUID> item_pair(folder_id, inv_item->getUUID());
move_inv->mMoveList.push_back(item_pair);
- move_inv->mCallback = NULL;
- move_inv->mUserData = NULL;
+ move_inv->mCallback = nullptr;
+ move_inv->mUserData = nullptr;
if (is_move)
{
warn_move_inventory(object, move_inv);
diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h
index 7f53f9998d..a53637a477 100644
--- a/indra/newview/llinventorygallery.h
+++ b/indra/newview/llinventorygallery.h
@@ -44,14 +44,14 @@ class LLGalleryGestureObserver;
class LLInventoryGalleryContextMenu;
-typedef boost::function<void()> callback_t;
+typedef std::function<void()> callback_t;
class LLInventoryGallery : public LLPanel, public LLEditMenuHandler
{
public:
typedef boost::signals2::signal<void(const LLUUID&)> selection_change_signal_t;
- typedef boost::function<void(const LLUUID&)> selection_change_callback_t;
+ typedef std::function<void(const LLUUID&)> selection_change_callback_t;
typedef std::deque<LLUUID> selection_deque;
struct Params
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index eda93e3e79..fe007a78cd 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -362,7 +362,7 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata)
}
else if ("show_on_map" == action)
{
- boost::function<void(LLLandmark*)> show_on_map_cb = [](LLLandmark* landmark)
+ std::function<void(LLLandmark*)> show_on_map_cb = [](LLLandmark* landmark)
{
LLVector3d landmark_global_pos;
if (landmark->getGlobalPos(landmark_global_pos))
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 8de0a3c648..043fd7003d 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1037,7 +1037,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id,
{
if (new_category.isNull())
{
- if (callback && !callback.empty())
+ if (callback)
{
callback(new_category);
}
@@ -1064,7 +1064,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id,
updateCategory(cat);
}
- if (callback && !callback.empty())
+ if (callback)
{
callback(new_category);
}
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 31345f3ab3..2859923df9 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -488,7 +488,7 @@ public:
void createNewCategory(const LLUUID& parent_id,
LLFolderType::EType preferred_type,
const std::string& name,
- inventory_func_type callback = NULL,
+ inventory_func_type callback = nullptr,
const LLUUID& thumbnail_id = LLUUID::null);
protected:
// Internal methods that add inventory and make sure that all of
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index 2e9f69ee29..ef6fa06e9f 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -53,7 +53,7 @@ public:
void scheduleFolderFetch(const LLUUID& cat_id, bool forced = false);
void scheduleItemFetch(const LLUUID& item_id, bool forced = false);
- typedef boost::function<void()> nullary_func_t;
+ typedef std::function<void()> nullary_func_t;
// AIS3 only, Fetches folder and everything links inside the folder point to
// Intended for outfits
void fetchFolderAndLinks(const LLUUID& cat_id, nullary_func_t callback);
@@ -78,7 +78,7 @@ public:
bool isBulkFetchProcessingComplete() const;
void setAllFoldersFetched();
- typedef boost::function<void()> folders_fetched_callback_t;
+ typedef std::function<void()> folders_fetched_callback_t;
boost::signals2::connection setFetchCompletionCallback(folders_fetched_callback_t cb);
void addRequestAtFront(const LLUUID& id, bool recursive, bool is_category);
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 12d6c44521..99cb9ec811 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -258,7 +258,7 @@ protected:
class LLInventoryCategoriesObserver : public LLInventoryObserver
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
LLInventoryCategoriesObserver() {};
virtual void changed(U32 mask);
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 411d28b97b..cde87ede9b 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -113,7 +113,7 @@ protected:
class LLInvPanelComplObserver : public LLInventoryCompletionObserver
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
LLInvPanelComplObserver(callback_t cb)
: mCallback(cb)
@@ -1595,7 +1595,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, bool take_keyboard_foc
setSelectionByID(obj_id, take_keyboard_focus);
}
-void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb)
+void LLInventoryPanel::setSelectCallback(const std::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb)
{
if (mFolderRoot.get())
{
@@ -2762,7 +2762,7 @@ void LLInventorySingleFolderPanel::updateSingleFolderRoot()
mFolderRoot.get()->setFollowsAll();
mFolderRoot.get()->addChild(mFolderRoot.get()->mStatusTextBox);
- if (!mSelectionCallback.empty())
+ if (mSelectionCallback != nullptr)
{
mFolderRoot.get()->setSelectCallback(mSelectionCallback);
}
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 50333709fc..dc2e304ab3 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -37,6 +37,7 @@
#include "llinventorymodel.h"
#include "llscrollcontainer.h"
#include "lluictrlfactory.h"
+#include <functional>
#include <set>
class LLInvFVBridge;
@@ -182,7 +183,7 @@ public:
// Call this method to set the selection.
void openAllFolders();
void setSelection(const LLUUID& obj_id, bool take_keyboard_focus);
- void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb);
+ void setSelectCallback(const std::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb);
void clearSelection();
selected_items_t getSelectedItems() const;
@@ -374,7 +375,7 @@ protected:
virtual LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge, bool allow_drop);
virtual LLFolderViewItem* createFolderViewItem(LLInvFVBridge * bridge);
- boost::function<void(const std::deque<LLFolderViewItem*>& items, bool user_action)> mSelectionCallback;
+ std::function<void(const std::deque<LLFolderViewItem*>& items, bool user_action)> mSelectionCallback;
// buildViewsTree does not include some checks and is meant
// for recursive use, use buildNewViews() for first call
@@ -436,7 +437,7 @@ public:
std::list<LLUUID> getNavBackwardList() { return mBackwardFolders; }
std::list<LLUUID> getNavForwardList() { return mForwardFolders; }
- typedef boost::function<void()> root_changed_callback_t;
+ typedef std::function<void()> root_changed_callback_t;
boost::signals2::connection setRootChangedCallback(root_changed_callback_t cb);
protected:
diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h
index 1abf10e110..0996dfed29 100644
--- a/indra/newview/lllandmarkactions.h
+++ b/indra/newview/lllandmarkactions.h
@@ -39,8 +39,8 @@ class LLLandmark;
class LLLandmarkActions
{
public:
- typedef boost::function<void(std::string& slurl)> slurl_callback_t;
- typedef boost::function<void(std::string& slurl, S32 x, S32 y, S32 z)> region_name_and_coords_callback_t;
+ typedef std::function<void(std::string& slurl)> slurl_callback_t;
+ typedef std::function<void(std::string& slurl, S32 x, S32 y, S32 z)> region_name_and_coords_callback_t;
/**
* @brief Fetches landmark LLViewerInventoryItems for the given landmark name.
@@ -107,7 +107,7 @@ public:
*
* @return pointer to loaded landmark from gLandmarkList or NULL if landmark does not exist or wasn't loaded.
*/
- static LLLandmark* getLandmark(const LLUUID& landmarkInventoryItemID, LLLandmarkList::loaded_callback_t cb = NULL);
+ static LLLandmark* getLandmark(const LLUUID& landmarkInventoryItemID, LLLandmarkList::loaded_callback_t cb = nullptr);
/**
* @brief Performs standard action of copying of SLURL from landmark to user's clipboard.
diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h
index 508148abde..fb8b5a1960 100644
--- a/indra/newview/lllandmarklist.h
+++ b/indra/newview/lllandmarklist.h
@@ -27,7 +27,7 @@
#ifndef LL_LLLANDMARKLIST_H
#define LL_LLLANDMARKLIST_H
-#include <boost/function.hpp>
+#include <functional>
#include <map>
#include "lllandmark.h"
#include "lluuid.h"
@@ -40,7 +40,7 @@ class LLInventoryItem;
class LLLandmarkList
{
public:
- typedef boost::function<void(LLLandmark*)> loaded_callback_t;
+ typedef std::function<void(LLLandmark*)> loaded_callback_t;
LLLandmarkList() {}
~LLLandmarkList();
@@ -50,7 +50,7 @@ public:
//const LLLandmark* getNext() { return mList.getNextData(); }
bool assetExists(const LLUUID& asset_uuid);
- LLLandmark* getAsset(const LLUUID& asset_uuid, loaded_callback_t cb = NULL);
+ LLLandmark* getAsset(const LLUUID& asset_uuid, loaded_callback_t cb = nullptr);
static void processGetAssetReply(
const LLUUID& uuid,
LLAssetType::EType type,
diff --git a/indra/newview/lllistcontextmenu.h b/indra/newview/lllistcontextmenu.h
index 4b515a3b26..cb2ca5260f 100644
--- a/indra/newview/lllistcontextmenu.h
+++ b/indra/newview/lllistcontextmenu.h
@@ -63,7 +63,7 @@ public:
virtual void hide();
protected:
- typedef boost::function<void (const LLUUID& id)> functor_t;
+ typedef std::function<void (const LLUUID& id)> functor_t;
virtual LLContextMenu* createMenu() = 0;
diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h
index ca9b81457c..34cb83367f 100644
--- a/indra/newview/lllocationhistory.h
+++ b/indra/newview/lllocationhistory.h
@@ -29,10 +29,9 @@
#include "llsingleton.h" // for LLSingleton
+#include <functional>
#include <vector>
#include <string>
-#include <map>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
class LLSD;
@@ -115,7 +114,7 @@ public:
};
typedef std::vector<LLLocationHistoryItem> location_list_t;
- typedef boost::function<void(EChangeType event)> history_changed_callback_t;
+ typedef std::function<void(EChangeType event)> history_changed_callback_t;
typedef boost::signals2::signal<void(EChangeType event)> history_changed_signal_t;
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 941b378b14..54ce51720f 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -29,7 +29,6 @@
#include "lleventdispatcher.h"
#include "lleventapi.h"
-#include <boost/function.hpp>
#include <memory> // std::shared_ptr
#include "llsecapi.h"
class LLLogin;
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index 281743c1d6..07ed667b0a 100644
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -28,15 +28,11 @@
#ifndef LL_LLMARKETPLACEFUNCTIONS_H
#define LL_LLMARKETPLACEFUNCTIONS_H
-
-#include <llsd.h>
-#include <boost/function.hpp>
-#include <boost/signals2.hpp>
-
+#include "llsd.h"
#include "llsingleton.h"
#include "llstring.h"
-
+#include <boost/signals2.hpp>
namespace MarketplaceErrorCodes
{
diff --git a/indra/newview/llmarketplacenotifications.h b/indra/newview/llmarketplacenotifications.h
index a602b930de..0b03bde16c 100644
--- a/indra/newview/llmarketplacenotifications.h
+++ b/indra/newview/llmarketplacenotifications.h
@@ -30,7 +30,7 @@
#include <llsd.h>
-#include <boost/function.hpp>
+#include <functional>
//
@@ -48,7 +48,7 @@ namespace LLMarketplaceInventoryNotifications
{
void update();
- typedef boost::function<void (const LLSD&)> NoCopyCallbackFunction;
+ typedef std::function<void (const LLSD&)> NoCopyCallbackFunction;
void addNoCopyNotification(const LLSD& payload, const NoCopyCallbackFunction& cb);
};
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index cbd95f9cc6..4e14f416e9 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -494,7 +494,7 @@ bool LLMaterialEditor::postBuild()
refreshUploadCost();
}
- boost::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData)
+ std::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData)
{
const U32 *flag = (const U32*)userData;
markChangesUnsaved(*flag);
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index c80d2a55ab..723f834d6f 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -67,7 +67,7 @@
class LLMaterialHttpHandler : public LLHttpSDHandler
{
public:
- typedef boost::function<void(bool, const LLSD&)> CallbackFunction;
+ typedef std::function<void(bool, const LLSD&)> CallbackFunction;
typedef std::shared_ptr<LLMaterialHttpHandler> ptr_t;
LLMaterialHttpHandler(const std::string& method, CallbackFunction cback);
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index f6d635f51f..9157e34833 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -190,7 +190,7 @@ LLMuteList::~LLMuteList()
void LLMuteList::cleanupSingleton()
{
- LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(NULL);
+ LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(nullptr);
}
bool LLMuteList::isLinden(const std::string& name)
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index dde85f4d29..ffff21c95c 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -210,12 +210,12 @@ private:
boost::signals2::signal<void(const LLUUID &)> mIconClickedSignal;
public:
- boost::signals2::connection setOnNameListCompleteCallback(boost::function<void(bool)> onNameListCompleteCallback)
+ boost::signals2::connection setOnNameListCompleteCallback(std::function<void(bool)> onNameListCompleteCallback)
{
return mNameListCompleteSignal.connect(onNameListCompleteCallback);
}
- boost::signals2::connection setIconClickedCallback(boost::function<void(const LLUUID &)> cb)
+ boost::signals2::connection setIconClickedCallback(std::function<void(const LLUUID&)> cb)
{
return mIconClickedSignal.connect(cb);
}
diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h
index bddbe0ff16..b3283ca642 100644
--- a/indra/newview/llnotificationlistitem.h
+++ b/indra/newview/llnotificationlistitem.h
@@ -84,7 +84,7 @@ public:
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
//callbacks
- typedef boost::function<void (LLNotificationListItem* item)> item_callback_t;
+ typedef std::function<void (LLNotificationListItem* item)> item_callback_t;
typedef boost::signals2::signal<void (LLNotificationListItem* item)> item_signal_t;
item_signal_t mOnItemClose;
item_signal_t mOnItemClick;
diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp
index 75bafb8785..5cec35fc88 100644
--- a/indra/newview/llnotificationstorage.cpp
+++ b/indra/newview/llnotificationstorage.cpp
@@ -41,7 +41,7 @@
#include "llregistry.h"
#include "llviewermessage.h"
-typedef boost::function<LLNotificationResponderInterface * (const LLSD& pParams)> responder_constructor_t;
+typedef std::function<LLNotificationResponderInterface*(const LLSD& pParams)> responder_constructor_t;
class LLResponderRegistry : public LLRegistrySingleton<std::string, responder_constructor_t, LLResponderRegistry>
{
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 5010be50eb..bcf7e45696 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -75,7 +75,7 @@ public:
class LLOutfitListBase : public LLPanelAppearanceTab
{
public:
- typedef boost::function<void(const LLUUID&)> selection_change_callback_t;
+ typedef std::function<void(const LLUUID&)> selection_change_callback_t;
typedef boost::signals2::signal<void(const LLUUID&)> selection_change_signal_t;
LLOutfitListBase();
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 7d55ba3265..69f51b03b6 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -263,7 +263,7 @@ void LLPanelBlockedList::callbackBlockByName(const std::string& text)
// Constructor/Destructor
LLFloaterGetBlockedObjectName::LLFloaterGetBlockedObjectName(const LLSD& key)
: LLFloater(key)
-, mGetObjectNameCallback(NULL)
+, mGetObjectNameCallback(nullptr)
{
}
diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h
index 1f470199ce..782a44bc5b 100644
--- a/indra/newview/llpanelblockedlist.h
+++ b/indra/newview/llpanelblockedlist.h
@@ -95,7 +95,7 @@ class LLFloaterGetBlockedObjectName : public LLFloater
{
friend class LLFloaterReg;
public:
- typedef boost::function<void (const std::string&)> get_object_name_callback_t;
+ typedef std::function<void(const std::string&)> get_object_name_callback_t;
bool postBuild() override;
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 282b6d4a0a..8bcb6e9ec3 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -438,7 +438,7 @@ template <typename T>
const LLEditWearableDictionary::PickerControlEntry*
get_picker_entry (const ETextureIndex index) { return NULL; }
-typedef boost::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t;
+typedef std::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t;
typedef struct PickerControlEntryNamePredicate
{
diff --git a/indra/newview/llpanelexperiencelisteditor.h b/indra/newview/llpanelexperiencelisteditor.h
index 7ff1ddac5a..70bc2ecd3c 100644
--- a/indra/newview/llpanelexperiencelisteditor.h
+++ b/indra/newview/llpanelexperiencelisteditor.h
@@ -42,7 +42,7 @@ public:
typedef boost::signals2::signal<void (const LLUUID&) > list_changed_signal_t;
// filter function for experiences, return true if the experience should be hidden.
- typedef boost::function<bool (const LLSD&)> experience_function;
+ typedef std::function<bool(const LLSD&)> experience_function;
typedef std::vector<experience_function> filter_list;
typedef LLHandle<LLFloaterExperiencePicker> PickerHandle;
LLPanelExperienceListEditor();
diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h
index 72c0b1b74d..5cde0a03fb 100644
--- a/indra/newview/llpanelexperiencepicker.h
+++ b/indra/newview/llpanelexperiencepicker.h
@@ -39,9 +39,9 @@ public:
friend class LLExperienceSearchResponder;
friend class LLFloaterExperiencePicker;
- typedef boost::function<void (const uuid_vec_t&)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&)> select_callback_t;
// filter function for experiences, return true if the experience should be hidden.
- typedef boost::function<bool (const LLSD&)> filter_function;
+ typedef std::function<bool(const LLSD&)> filter_function;
typedef std::vector<filter_function> filter_list;
LLPanelExperiencePicker();
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 33599357a3..64e0a8c429 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -251,7 +251,7 @@ static LLPanelInjector<LLPanelPeople> t_people("panel_people");
class LLPanelPeople::Updater
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
Updater(callback_t cb)
: mCallback(cb)
{
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 9ef9c26411..c6a88dbada 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -41,7 +41,7 @@
LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model) :
LLConversationItemSession(data_source->getSessionID(), root_view_model),
mSpeakerMgr(data_source),
- mValidateSpeakerCallback(NULL)
+ mValidateSpeakerCallback(nullptr)
{
mSpeakerAddListener = new SpeakerAddListener(*this);
mSpeakerRemoveListener = new SpeakerRemoveListener(*this);
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 7cb29a6211..4b4334c6f9 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -27,8 +27,8 @@
#ifndef LL_PARTICIPANTLIST_H
#define LL_PARTICIPANTLIST_H
-#include "llviewerprecompiledheaders.h"
#include "llconversationmodel.h"
+#include "llevent.h"
class LLSpeakerMgr;
class LLUICtrl;
@@ -38,7 +38,7 @@ class LLParticipantList : public LLConversationItemSession
LOG_CLASS(LLParticipantList);
public:
- typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t;
+ typedef std::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t;
LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model);
~LLParticipantList();
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index c9b0978a38..412e25a7b1 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -34,7 +34,6 @@
#include <map>
#include <boost/bind.hpp>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llagent.h"
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index 663cb3cf34..d209266467 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -27,10 +27,10 @@
#ifndef LL_LLPATHFINDINGMANAGER_H
#define LL_LLPATHFINDINGMANAGER_H
+#include <functional>
#include <string>
#include <map>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llpathfindinglinkset.h"
@@ -76,21 +76,21 @@ public:
void requestGetNavMeshForRegion(LLViewerRegion *pRegion, bool pIsGetStatusOnly);
typedef U32 request_id_t;
- typedef boost::function<void (request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t;
+ typedef std::function<void(request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t;
void requestGetLinksets(request_id_t pRequestId, object_request_callback_t pLinksetsCallback) const;
void requestSetLinksets(request_id_t pRequestId, const LLPathfindingObjectListPtr &pLinksetListPtr, LLPathfindingLinkset::ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD, object_request_callback_t pLinksetsCallback) const;
void requestGetCharacters(request_id_t pRequestId, object_request_callback_t pCharactersCallback) const;
- typedef boost::function<void (bool)> agent_state_callback_t;
+ typedef std::function<void(bool)> agent_state_callback_t;
typedef boost::signals2::signal<void (bool)> agent_state_signal_t;
typedef boost::signals2::connection agent_state_slot_t;
agent_state_slot_t registerAgentStateListener(agent_state_callback_t pAgentStateCallback);
void requestGetAgentState();
- typedef boost::function<void (bool)> rebake_navmesh_callback_t;
+ typedef std::function<void(bool)> rebake_navmesh_callback_t;
void requestRebakeNavMesh(rebake_navmesh_callback_t pRebakeNavMeshCallback);
protected:
diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h
index d838a1a51c..44397c9118 100644
--- a/indra/newview/llpathfindingnavmesh.h
+++ b/indra/newview/llpathfindingnavmesh.h
@@ -27,9 +27,9 @@
#ifndef LL_LLPATHFINDINGNAVMESH_H
#define LL_LLPATHFINDINGNAVMESH_H
+#include <functional>
#include <string>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llpathfindingnavmeshstatus.h"
@@ -54,7 +54,7 @@ public:
kNavMeshRequestError
} ENavMeshRequestStatus;
- typedef boost::function<void (ENavMeshRequestStatus, const LLPathfindingNavMeshStatus &, const LLSD::Binary &)> navmesh_callback_t;
+ typedef std::function<void(ENavMeshRequestStatus, const LLPathfindingNavMeshStatus&, const LLSD::Binary&)> navmesh_callback_t;
typedef boost::signals2::signal<void (ENavMeshRequestStatus, const LLPathfindingNavMeshStatus &, const LLSD::Binary &)> navmesh_signal_t;
typedef boost::signals2::connection navmesh_slot_t;
diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h
index e770efa0d0..8f7750d4c5 100644
--- a/indra/newview/llpathfindingnavmeshzone.h
+++ b/indra/newview/llpathfindingnavmeshzone.h
@@ -27,9 +27,9 @@
#ifndef LL_LLPATHFINDINGNAVMESHZONE_H
#define LL_LLPATHFINDINGNAVMESHZONE_H
+#include <functional>
#include <vector>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llpathfindingnavmesh.h"
@@ -62,7 +62,7 @@ public:
kNavMeshZoneComplete
} ENavMeshZoneStatus;
- typedef boost::function<void (ENavMeshZoneRequestStatus)> navmesh_zone_callback_t;
+ typedef std::function<void(ENavMeshZoneRequestStatus)> navmesh_zone_callback_t;
typedef boost::signals2::signal<void (ENavMeshZoneRequestStatus)> navmesh_zone_signal_t;
typedef boost::signals2::connection navmesh_zone_slot_t;
@@ -81,7 +81,7 @@ public:
protected:
private:
- typedef boost::function<void (void)> navmesh_location_callback_t;
+ typedef std::function<void(void)> navmesh_location_callback_t;
class NavMeshLocation
{
public:
diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h
index 79a796dd60..bf27f114f5 100644
--- a/indra/newview/llpathfindingobject.h
+++ b/indra/newview/llpathfindingobject.h
@@ -27,9 +27,9 @@
#ifndef LL_LLPATHFINDINGOBJECT_H
#define LL_LLPATHFINDINGOBJECT_H
+#include <functional>
#include <string>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llavatarname.h"
@@ -61,7 +61,7 @@ public:
inline bool isGroupOwned() const {return mIsGroupOwned;};
inline const LLVector3& getLocation() const {return mLocation;};
- typedef boost::function<void (const LLPathfindingObject *)> name_callback_t;
+ typedef std::function<void(const LLPathfindingObject*)> name_callback_t;
typedef boost::signals2::signal<void (const LLPathfindingObject *)> name_signal_t;
typedef boost::signals2::connection name_connection_t;
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp
index 61791492e7..57f4aefadf 100644
--- a/indra/newview/llpathfindingpathtool.cpp
+++ b/indra/newview/llpathfindingpathtool.cpp
@@ -30,7 +30,6 @@
#include "llpathfindingpathtool.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llagent.h"
diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h
index 189b9d4954..f6b4500f0f 100644
--- a/indra/newview/llpathfindingpathtool.h
+++ b/indra/newview/llpathfindingpathtool.h
@@ -27,7 +27,7 @@
#ifndef LL_LLPATHFINDINGPATHTOOL_H
#define LL_LLPATHFINDINGPATHTOOL_H
-#include <boost/function.hpp>
+#include <functional>
#include <boost/signals2.hpp>
#include "llpathinglib.h"
@@ -62,7 +62,7 @@ public:
kCharacterTypeD
} ECharacterType;
- typedef boost::function<void (void)> path_event_callback_t;
+ typedef std::function<void(void)> path_event_callback_t;
typedef boost::signals2::signal<void (void)> path_event_signal_t;
typedef boost::signals2::connection path_event_slot_t;
diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp
index cc55b3c8db..16149b7e33 100644
--- a/indra/newview/llpopupview.cpp
+++ b/indra/newview/llpopupview.cpp
@@ -94,8 +94,8 @@ void LLPopupView::draw()
LLPanel::draw();
}
-bool LLPopupView::handleMouseEvent(boost::function<bool(LLView*, S32, S32)> func,
- boost::function<bool(LLView*)> predicate,
+bool LLPopupView::handleMouseEvent(std::function<bool(LLView*, S32, S32)> func,
+ std::function<bool(LLView*)> predicate,
S32 x, S32 y,
bool close_popups)
{
diff --git a/indra/newview/llpopupview.h b/indra/newview/llpopupview.h
index 4a88866185..8c0db623ac 100644
--- a/indra/newview/llpopupview.h
+++ b/indra/newview/llpopupview.h
@@ -55,7 +55,7 @@ public:
popup_list_t getCurrentPopups() { return mPopups; }
private:
- bool handleMouseEvent(boost::function<bool(LLView*, S32, S32)>, boost::function<bool(LLView*)>, S32 x, S32 y, bool close_popups);
+ bool handleMouseEvent(std::function<bool(LLView*, S32, S32)>, std::function<bool(LLView*)>, S32 x, S32 y, bool close_popups);
popup_list_t mPopups;
};
#endif //LL_LLROOTVIEW_H
diff --git a/indra/newview/llpostcard.h b/indra/newview/llpostcard.h
index cfe6f3951d..11178aa027 100644
--- a/indra/newview/llpostcard.h
+++ b/indra/newview/llpostcard.h
@@ -40,7 +40,7 @@ class LLPostCard
LOG_CLASS(LLPostCard);
public:
- typedef boost::function<void(bool ok)> result_callback_t;
+ typedef std::function<void(bool ok)> result_callback_t;
static void setPostResultCallback(result_callback_t cb) { mResultCallback = cb; }
static void reportPostResult(bool ok);
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 0bbe540207..a56697117a 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -58,7 +58,7 @@ class LLScriptMovedObserver;
class LLLiveLSLFile : public LLLiveFile
{
public:
- typedef boost::function<bool(const std::string& filename)> change_callback_t;
+ typedef std::function<bool(const std::string& filename)> change_callback_t;
LLLiveLSLFile(std::string file_path, change_callback_t change_cb);
~LLLiveLSLFile();
diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp
index 5dbd579b45..2790705fd8 100644
--- a/indra/newview/llsetkeybinddialog.cpp
+++ b/indra/newview/llsetkeybinddialog.cpp
@@ -40,7 +40,7 @@ class LLSetKeyBindDialog::Updater : public LLEventTimer
{
public:
- typedef boost::function<void(MASK)> callback_t;
+ typedef std::function<void(MASK)> callback_t;
Updater(callback_t cb, F32 period, MASK mask)
:LLEventTimer(period),
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index b30852941f..c3773d2c33 100644
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -141,7 +141,7 @@ private:
class LLSpeakerActionTimer : public LLEventTimer
{
public:
- typedef boost::function<bool(const LLUUID&)> action_callback_t;
+ typedef std::function<bool(const LLUUID&)> action_callback_t;
typedef std::map<LLUUID, LLSpeakerActionTimer*> action_timers_map_t;
typedef action_timers_map_t::value_type action_value_t;
typedef action_timers_map_t::const_iterator action_timer_const_iter_t;
diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp
index 6c252ed31f..140b63c84d 100644
--- a/indra/newview/llsplitbutton.cpp
+++ b/indra/newview/llsplitbutton.cpp
@@ -118,7 +118,7 @@ void LLSplitButton::onItemSelected(LLUICtrl* ctrl)
hideButtons();
// call the callback if it exists
- if(!mSelectionCallback.empty())
+ if(mSelectionCallback != nullptr)
{
mSelectionCallback(this, ctrl->getName());
}
diff --git a/indra/newview/llsyswellitem.h b/indra/newview/llsyswellitem.h
index 0a4e26cb98..2ad5de816b 100644
--- a/indra/newview/llsyswellitem.h
+++ b/indra/newview/llsyswellitem.h
@@ -60,7 +60,7 @@ public:
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
//callbacks
- typedef boost::function<void (LLSysWellItem* item)> syswell_item_callback_t;
+ typedef std::function<void (LLSysWellItem* item)> syswell_item_callback_t;
typedef boost::signals2::signal<void (LLSysWellItem* item)> syswell_item_signal_t;
syswell_item_signal_t mOnItemClose;
syswell_item_signal_t mOnItemClick;
diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h
index b534b136b0..76bd65e7a9 100644
--- a/indra/newview/llteleporthistory.h
+++ b/indra/newview/llteleporthistory.h
@@ -29,9 +29,9 @@
#include "llsingleton.h" // for LLSingleton
+#include <functional>
#include <vector>
#include <string>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llteleporthistorystorage.h"
@@ -80,7 +80,7 @@ class LLTeleportHistory: public LLSingleton<LLTeleportHistory>
public:
typedef std::vector<LLTeleportHistoryItem> slurl_list_t;
- typedef boost::function<void()> history_callback_t;
+ typedef std::function<void()> history_callback_t;
typedef boost::signals2::signal<void()> history_signal_t;
/**
diff --git a/indra/newview/llteleporthistorystorage.h b/indra/newview/llteleporthistorystorage.h
index 643c4a6bfc..07da596aab 100644
--- a/indra/newview/llteleporthistorystorage.h
+++ b/indra/newview/llteleporthistorystorage.h
@@ -77,7 +77,7 @@ public:
typedef std::vector<LLTeleportHistoryPersistentItem> slurl_list_t;
// removed_index is index of removed item, which replaced by more recent
- typedef boost::function<void(S32 removed_index)> history_callback_t;
+ typedef std::function<void(S32 removed_index)> history_callback_t;
typedef boost::signals2::signal<void(S32 removed_index)> history_signal_t;
/**
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index b2f2509e80..52ec8c17c1 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -166,10 +166,10 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mBlankImageAssetID(blank_image_asset_id),
mAllowNoTexture(allow_no_texture),
mLabel(label),
- mTentativeLabel(NULL),
- mResolutionLabel(NULL),
+ mTentativeLabel(nullptr),
+ mResolutionLabel(nullptr),
mActive( true ),
- mFilterEdit(NULL),
+ mFilterEdit(nullptr),
mImmediateFilterPermMask(immediate_filter_perm_mask),
mDnDFilterPermMask(dnd_filter_perm_mask),
mContextConeOpacity(0.f),
@@ -180,10 +180,10 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mMaxDim(S32_MAX),
mMinDim(0),
mPreviewSettingChanged(false),
- mOnFloaterCommitCallback(NULL),
- mOnFloaterCloseCallback(NULL),
- mSetImageAssetIDCallback(NULL),
- mOnUpdateImageStatsCallback(NULL),
+ mOnFloaterCommitCallback(nullptr),
+ mOnFloaterCloseCallback(nullptr),
+ mSetImageAssetIDCallback(nullptr),
+ mOnUpdateImageStatsCallback(nullptr),
mBakeTextureEnabled(false),
mLocalTextureEnabled(false),
mNoCopyTextureSelected(false),
@@ -1090,7 +1090,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
mNoCopyTextureSelected = false;
if (itemp)
{
- if (!mTextureSelectedCallback.empty())
+ if (mTextureSelectedCallback != nullptr)
{
mTextureSelectedCallback(itemp);
}
@@ -1683,11 +1683,11 @@ static LLDefaultChildRegistry::Register<LLTextureCtrl> r("texture_picker");
LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
: LLUICtrl(p),
- mDragCallback(NULL),
- mDropCallback(NULL),
- mOnCancelCallback(NULL),
- mOnCloseCallback(NULL),
- mOnSelectCallback(NULL),
+ mDragCallback(nullptr),
+ mDropCallback(nullptr),
+ mOnCancelCallback(nullptr),
+ mOnCloseCallback(nullptr),
+ mOnSelectCallback(nullptr),
mBorderColor( p.border_color() ),
mAllowNoTexture( p.allow_no_texture ),
mAllowLocalTexture( true ),
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 467b8d1091..e0060474ce 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -50,8 +50,8 @@ class LLViewerFetchedTexture;
class LLFetchedGLTFMaterial;
// used for setting drag & drop callbacks.
-typedef boost::function<bool (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback;
-typedef boost::function<void (LLInventoryItem*)> texture_selected_callback;
+typedef std::function<bool (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback;
+typedef std::function<void (LLInventoryItem*)> texture_selected_callback;
// Helper functions for UI that work with picker
bool get_is_predefined_texture(LLUUID asset_id);
@@ -299,10 +299,10 @@ private:
//////////////////////////////////////////////////////////////////////////////////////////
// LLFloaterTexturePicker
-typedef boost::function<void(LLTextureCtrl::ETexturePickOp op, LLPickerSource source, const LLUUID& asset_id, const LLUUID& inventory_id, const LLUUID& tracking_id)> floater_commit_callback;
-typedef boost::function<void()> floater_close_callback;
-typedef boost::function<void(const LLUUID& asset_id)> set_image_asset_id_callback;
-typedef boost::function<void(LLPointer<LLViewerTexture> texture)> set_on_update_image_stats_callback;
+typedef std::function<void(LLTextureCtrl::ETexturePickOp op, LLPickerSource source, const LLUUID& asset_id, const LLUUID& inventory_id, const LLUUID& tracking_id)> floater_commit_callback;
+typedef std::function<void()> floater_close_callback;
+typedef std::function<void(const LLUUID& asset_id)> set_image_asset_id_callback;
+typedef std::function<void(LLPointer<LLViewerTexture> texture)> set_on_update_image_stats_callback;
class LLFloaterTexturePicker : public LLFloater
{
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index b05c9fde59..3c939a88e5 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -140,7 +140,7 @@ LLToast::LLToast(const LLToast::Params& p)
}
// init callbacks if present
- if(!p.on_delete_toast().empty())
+ if (p.on_delete_toast() != nullptr)
{
mOnDeleteToastSignal.connect(p.on_delete_toast());
}
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index cf116bfadf..a73f7820ba 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -75,7 +75,7 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
friend class LLToastLifeTimer;
public:
- typedef boost::function<void (LLToast* toast)> toast_callback_t;
+ typedef std::function<void (LLToast* toast)> toast_callback_t;
typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t;
typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t;
diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h
index 0f1574f2d5..6c79674d76 100644
--- a/indra/newview/lltoolpipette.h
+++ b/indra/newview/lltoolpipette.h
@@ -34,7 +34,6 @@
#include "lltool.h"
#include "lltextureentry.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
class LLViewerObject;
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index bc656feaba..dcd1582eb9 100644
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -199,7 +199,7 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, LLSD
bOk = false;
}
- if (!fnc.empty())
+ if (fnc != nullptr)
{
fnc(service, bOk, parseResult);
}
@@ -275,7 +275,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
LLStringUtil::replaceString(translation, "&amp;", "&");
LLStringUtil::replaceString(translation, "&apos;", "'");
- if (!success.empty())
+ if (success != nullptr)
success(translation, detected_lang);
}
else
@@ -291,7 +291,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
}
LL_WARNS() << "Translation request failed: " << err_msg << LL_ENDL;
- if (!failure.empty())
+ if (failure != nullptr)
failure(status, err_msg);
}
}
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index 0ad769b27f..14372cf406 100644
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -28,10 +28,10 @@
#define LL_LLTRANSLATE_H
#include "llbufferstream.h"
-#include <boost/function.hpp>
-
#include "llsingleton.h"
+#include <functional>
+
class LLTranslationAPIHandler;
/**
* Entry point for machine translation services.
@@ -59,9 +59,9 @@ public :
SERVICE_DEEPL,
} EService;
- typedef boost::function<void(EService, bool, S32)> KeyVerificationResult_fn;
- typedef boost::function<void(std::string , std::string )> TranslationSuccess_fn;
- typedef boost::function<void(int, std::string)> TranslationFailure_fn;
+ typedef std::function<void(EService, bool, S32)> KeyVerificationResult_fn;
+ typedef std::function<void(std::string, std::string)> TranslationSuccess_fn;
+ typedef std::function<void(int, std::string)> TranslationFailure_fn;
/**
* Translate given text.
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index ea3088613f..3c79f0b21c 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -63,13 +63,13 @@ const LLKeyData agent_control_lbutton(CLICK_LEFT, KEY_NONE, MASK_NONE, true);
struct LLKeybindFunctionData
{
- LLKeybindFunctionData(boost::function<bool(EKeystate keystate)> function, bool global)
+ LLKeybindFunctionData(std::function<bool(EKeystate keystate)> function, bool global)
:
mFunction(function),
mIsGlobal(global)
{
}
- boost::function<bool(EKeystate keystate)> mFunction;
+ std::function<bool(EKeystate keystate)> mFunction;
// todo: might be good idea to make this into enum, like: global/inworld/menu
bool mIsGlobal;
};
@@ -1165,8 +1165,8 @@ bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask,
bool LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name)
{
size_t index;
- typedef boost::function<bool(EKeystate)> function_t;
- function_t function = NULL;
+ typedef std::function<bool(EKeystate)> function_t;
+ function_t function = nullptr;
std::string name;
// Allow remapping of F2-F12
@@ -1255,8 +1255,8 @@ bool LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
bool LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name)
{
size_t index;
- typedef boost::function<bool(EKeystate)> function_t;
- function_t function = NULL;
+ typedef std::function<bool(EKeystate)> function_t;
+ function_t function = nullptr;
if (mouse == CLICK_LEFT
&& mask == MASK_NONE
diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h
index 50b2c4ab9f..80ba99e201 100644
--- a/indra/newview/llviewerinput.h
+++ b/indra/newview/llviewerinput.h
@@ -38,7 +38,7 @@ class LLWindow;
class LLNamedFunction
{
public:
- LLNamedFunction() : mFunction(NULL) { };
+ LLNamedFunction() : mFunction(nullptr) { };
~LLNamedFunction() { };
std::string mName;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 6e9458597a..efa3f5cd1e 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1712,7 +1712,7 @@ void create_new_item(const std::string& name,
LLAssetType::EType asset_type,
LLInventoryType::EType inv_type,
U32 next_owner_perm,
- std::function<void(const LLUUID&)> created_cb = NULL)
+ std::function<void(const LLUUID&)> created_cb = nullptr)
{
std::string desc;
LLViewerAssetType::generateDescriptionFor(asset_type, desc);
@@ -1836,7 +1836,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L
parent_id = gInventory.getRootFolderID();
}
- std::function<void(const LLUUID&)> callback_cat_created = NULL;
+ std::function<void(const LLUUID&)> callback_cat_created = nullptr;
if (panel)
{
LLHandle<LLPanel> handle = panel->getHandle();
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 0dfbf0cced..a42bdaa2b0 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -284,9 +284,9 @@ private:
LLUUID mTargetLandmarkId;
};
-typedef boost::function<void(const LLUUID&)> inventory_func_type;
-typedef boost::function<void(const LLSD&)> llsd_func_type;
-typedef boost::function<void()> nullary_func_type;
+typedef std::function<void(const LLUUID&)> inventory_func_type;
+typedef std::function<void(const LLSD&)> llsd_func_type;
+typedef std::function<void()> nullary_func_type;
void no_op_inventory_func(const LLUUID&); // A do-nothing inventory_func
void no_op_llsd_func(const LLSD&); // likewise for LLSD
@@ -470,7 +470,7 @@ void menu_create_inventory_item(LLInventoryPanel* root,
const LLSD& userdata,
const LLUUID& default_parent_uuid = LLUUID::null);
-void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null, std::function<void(const LLUUID&)> folder_created_cb = NULL);
+void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null, std::function<void(const LLUUID&)> folder_created_cb = nullptr);
void slam_inventory_folder(const LLUUID& folder_id,
const LLSD& contents,
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 52f383faa9..00743909f0 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -36,9 +36,10 @@
#include "llnotifications.h"
#include "llextendedstatus.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
//
// Forward declarations
//
@@ -216,7 +217,7 @@ class LLViewerMessage : public LLSingleton<LLViewerMessage>
{
LLSINGLETON_EMPTY_CTOR(LLViewerMessage);
public:
- typedef boost::function<void()> teleport_started_callback_t;
+ typedef std::function<void()> teleport_started_callback_t;
typedef boost::signals2::signal<void()> teleport_started_signal_t;
boost::signals2::connection setTeleportStartedCallback(teleport_started_callback_t cb);
@@ -264,7 +265,7 @@ private:
std::string getSanitizedDescription();
void sendReceiveResponse(bool accept, const LLUUID &destination_folder_id);
- typedef boost::function<bool (const LLSD&, const LLSD&)> respond_function_t;
+ typedef std::function<bool (const LLSD&, const LLSD&)> respond_function_t;
typedef std::map<std::string, respond_function_t> respond_function_map_t;
respond_function_map_t mRespondFunctions;
diff --git a/indra/newview/llviewerparcelaskplay.h b/indra/newview/llviewerparcelaskplay.h
index 720daa2e5d..563fb13011 100644
--- a/indra/newview/llviewerparcelaskplay.h
+++ b/indra/newview/llviewerparcelaskplay.h
@@ -38,7 +38,7 @@ class LLViewerParcelAskPlay : public LLSingleton<LLViewerParcelAskPlay>
void cleanupSingleton() override;
public:
// functor expects functor(region_id, parcel_id, url, play/stop)
- typedef boost::function<void(const LLUUID&, const S32&, const std::string&, const bool&)> ask_callback;
+ typedef std::function<void(const LLUUID&, const S32&, const std::string&, const bool&)> ask_callback;
void askToPlay(const LLUUID &region_id, const S32 &parcel_id, const std::string &url, ask_callback cb);
void cancelNotification();
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 1925cd23ed..8439283eb0 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -33,9 +33,10 @@
#include "llparcelselection.h"
#include "llui.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
class LLUUID;
class LLMessageSystem;
class LLParcel;
@@ -79,9 +80,9 @@ class LLViewerParcelMgr : public LLSingleton<LLViewerParcelMgr>
~LLViewerParcelMgr();
public:
- typedef boost::function<void (const LLVector3d&, const bool& local)> teleport_finished_callback_t;
+ typedef std::function<void (const LLVector3d&, const bool& local)> teleport_finished_callback_t;
typedef boost::signals2::signal<void (const LLVector3d&, const bool&)> teleport_finished_signal_t;
- typedef boost::function<void()> teleport_failed_callback_t;
+ typedef std::function<void()> teleport_failed_callback_t;
typedef boost::signals2::signal<void()> teleport_failed_signal_t;
static void cleanupGlobals();
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index b556aef768..6dead0cf82 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -76,12 +76,12 @@ LLViewerPart::LLViewerPart() :
mPartID(0),
mLastUpdateTime(0.f),
mSkipOffset(0.f),
- mVPCallback(NULL),
- mImagep(NULL)
+ mVPCallback(nullptr),
+ mImagep(nullptr)
{
- mPartSourcep = NULL;
- mParent = NULL;
- mChild = NULL;
+ mPartSourcep = nullptr;
+ mParent = nullptr;
+ mChild = nullptr;
++LLViewerPartSim::sParticleCount2 ;
}
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 5700d8b278..f6ee00cb25 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -125,7 +125,6 @@
#include "llpanel.h"
#include "llfloater.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include <boost/unordered_set.hpp>
#include <boost/unordered_map.hpp>
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 244e2b7835..b3ec857907 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -295,10 +295,10 @@ public:
typedef LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t httpCallback_t;
bool requestPostCapability(const std::string &capName,
LLSD &postData,
- httpCallback_t cbSuccess = NULL,
- httpCallback_t cbFailure = NULL);
- bool requestGetCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
- bool requestDelCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
+ httpCallback_t cbSuccess = nullptr,
+ httpCallback_t cbFailure = nullptr);
+ bool requestGetCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
+ bool requestDelCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
/// implements LLCapabilityProvider
/*virtual*/ const LLHost& getHost() const;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index cb7d45564d..692e192edb 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -6142,7 +6142,7 @@ bool LLViewerWindow::getUIVisibility()
//
LLPickInfo::LLPickInfo()
: mKeyMask(MASK_NONE),
- mPickCallback(NULL),
+ mPickCallback(nullptr),
mPickType(PICK_INVALID),
mWantSurfaceInfo(false),
mObjectFace(-1),
@@ -6153,7 +6153,7 @@ LLPickInfo::LLPickInfo()
mNormal(),
mTangent(),
mBinormal(),
- mHUDIcon(NULL),
+ mHUDIcon(nullptr),
mPickTransparent(false),
mPickRigged(false),
mPickParticle(false)
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 61aa84394c..f3c7ef3289 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -48,9 +48,10 @@
#include "lltrace.h"
#include "llsnapshotmodel.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
class LLView;
class LLViewerObject;
class LLUUID;
@@ -238,7 +239,7 @@ public:
const std::map<std::string, std::string>& args);
// signal on update of WorldView rect
- typedef boost::function<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_callback_t;
+ typedef std::function<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_callback_t;
typedef boost::signals2::signal<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_signal_t;
world_rect_signal_t mOnWorldViewRectUpdated;
boost::signals2::connection setOnWorldViewRectUpdated(world_rect_callback_t cb) { return mOnWorldViewRectUpdated.connect(cb); }
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 1e62f47082..e5c14a34a5 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2735,7 +2735,7 @@ void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch)
// Dereferencing the previous callback will cause
// updateAppearanceFromCOF to be called, whenever all refs
// have resolved.
- gAgentAvatarp->mEndCustomizeCallback = NULL;
+ gAgentAvatarp->mEndCustomizeCallback = nullptr;
}
}
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index bf119638d3..18e1d60987 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -57,7 +57,7 @@ public:
typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state, const EDirection& direction, bool ended_by_agent, const LLUUID& session_id)> state_changed_signal_t;
// on current channel changed signal
- typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t;
+ typedef std::function<void(const LLUUID& session_id)> channel_changed_callback_t;
typedef boost::signals2::signal<void(const LLUUID& session_id)> channel_changed_signal_t;
static channel_changed_signal_t sCurrentVoiceChannelChangedSignal;
static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb, bool at_front = false);
diff --git a/indra/newview/llwatchdog.h b/indra/newview/llwatchdog.h
index 1931c582b0..b7dd55577e 100644
--- a/indra/newview/llwatchdog.h
+++ b/indra/newview/llwatchdog.h
@@ -27,8 +27,6 @@
#ifndef LL_LLTHREADWATCHDOG_H
#define LL_LLTHREADWATCHDOG_H
-#include <boost/function.hpp>
-
#ifndef LL_TIMER_H
#include "lltimer.h"
#endif
diff --git a/indra/newview/llwebprofile.h b/indra/newview/llwebprofile.h
index a9cfa102c0..5b3f3f2ce1 100644
--- a/indra/newview/llwebprofile.h
+++ b/indra/newview/llwebprofile.h
@@ -51,7 +51,7 @@ class LLWebProfile
LOG_CLASS(LLWebProfile);
public:
- typedef boost::function<void(bool ok)> status_callback_t;
+ typedef std::function<void(bool ok)> status_callback_t;
static void uploadImage(LLPointer<LLImageFormatted> image, const std::string& caption, bool add_location);
static void setAuthCookie(const std::string& cookie);
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
index 1b2953fea6..edaa44aa70 100644
--- a/indra/newview/llwindowlistener.cpp
+++ b/indra/newview/llwindowlistener.cpp
@@ -41,9 +41,9 @@
#include "llrootview.h"
#include "llsdutil.h"
#include "stringize.h"
+#include <functional>
#include <typeinfo>
#include <map>
-#include <boost/bind.hpp>
LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& kbgetter)
: LLEventAPI("LLWindow", "Inject input events into the LLWindow instance"),
@@ -352,7 +352,7 @@ struct WhichButton: public StringLookup<Actions>
};
static WhichButton buttons;
-typedef boost::function<bool(LLCoordGL, MASK)> MouseFunc;
+typedef std::function<bool(LLCoordGL, MASK)> MouseFunc;
// Wrap a function returning 'void' to return 'true' instead. I'm sure there's
// a more generic way to accomplish this, but generically handling the
@@ -363,7 +363,7 @@ typedef boost::function<bool(LLCoordGL, MASK)> MouseFunc;
// seem to overload comma the same way; or at least not with bind().)
class MouseFuncTrue
{
- typedef boost::function<void(LLCoordGL, MASK)> MouseFuncVoid;
+ typedef std::function<void(LLCoordGL, MASK)> MouseFuncVoid;
MouseFuncVoid mFunc;
public:
@@ -463,7 +463,7 @@ static void mouseEvent(const MouseFunc& func, const LLSD& request)
// Instantiate a TemporaryDrilldownFunc to route incoming mouse events
// to the target LLView*. But put it on the heap since "path" is
- // optional. Nonetheless, manage it with a boost::scoped_ptr so it
+ // optional. Nonetheless, manage it with a std::unique_ptr so it
// will be destroyed when we leave.
tempfunc = std::make_unique<LLView::TemporaryDrilldownFunc>(llview::TargetEvent(target));
}
@@ -484,11 +484,11 @@ void LLWindowListener::mouseDown(LLSD const & request)
if (actions.valid)
{
// Normally you can pass NULL to an LLWindow* without compiler
- // complaint, but going through boost::bind() evidently
+ // complaint, but going through std::bind() evidently
// bypasses that special case: it only knows you're trying to pass an
// int to a pointer. Explicitly cast NULL to the desired pointer type.
- mouseEvent(boost::bind(actions.down, mWindow,
- static_cast<LLWindow*>(NULL), _1, _2),
+ mouseEvent(std::bind(actions.down, mWindow,
+ static_cast<LLWindow*>(NULL), std::placeholders::_1, std::placeholders::_2),
request);
}
}
@@ -498,8 +498,7 @@ void LLWindowListener::mouseUp(LLSD const & request)
Actions actions(buttons.lookup(request["button"]));
if (actions.valid)
{
- mouseEvent(boost::bind(actions.up, mWindow,
- static_cast<LLWindow*>(NULL), _1, _2),
+ mouseEvent(std::bind(actions.up, mWindow, static_cast<LLWindow*>(NULL), std::placeholders::_1, std::placeholders::_2),
request);
}
}
@@ -511,8 +510,8 @@ void LLWindowListener::mouseMove(LLSD const & request)
// void, whereas mouseEvent() accepts a function returning bool -- and
// uses that bool return. Use MouseFuncTrue to construct a callable that
// returns bool anyway.
- mouseEvent(MouseFuncTrue(boost::bind(&LLWindowCallbacks::handleMouseMove, mWindow,
- static_cast<LLWindow*>(NULL), _1, _2)),
+ mouseEvent(MouseFuncTrue(std::bind(&LLWindowCallbacks::handleMouseMove, mWindow, static_cast<LLWindow*>(NULL), std::placeholders::_1,
+ std::placeholders::_2)),
request);
}
diff --git a/indra/newview/llwindowlistener.h b/indra/newview/llwindowlistener.h
index 207f64c8c0..9908a9c451 100644
--- a/indra/newview/llwindowlistener.h
+++ b/indra/newview/llwindowlistener.h
@@ -28,7 +28,7 @@
#define LL_LLWINDOWLISTENER_H
#include "lleventapi.h"
-#include <boost/function.hpp>
+#include <functional>
class LLKeyboard;
class LLViewerWindow;
@@ -36,7 +36,7 @@ class LLViewerWindow;
class LLWindowListener : public LLEventAPI
{
public:
- typedef boost::function<LLKeyboard*()> KeyboardGetter;
+ typedef std::function<LLKeyboard*()> KeyboardGetter;
LLWindowListener(LLViewerWindow * window, const KeyboardGetter& kbgetter);
void getInfo(LLSD const & evt);
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index aab19a4d5f..68e7f3ee29 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -28,7 +28,6 @@
#define LL_LLWORLDMAP_H
#include "llworldmipmap.h"
-#include <boost/function.hpp>
#include "v3dmath.h"
#include "lluuid.h"
diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp
index c60d075e0c..e81e6b4596 100644
--- a/indra/newview/llworldmapmessage.cpp
+++ b/indra/newview/llworldmapmessage.cpp
@@ -43,7 +43,7 @@ LLWorldMapMessage::LLWorldMapMessage() :
mSLURLRegionName(),
mSLURLRegionHandle(0),
mSLURL(),
- mSLURLCallback(0),
+ mSLURLCallback(nullptr),
mSLURLTeleport(false)
{
}
@@ -215,14 +215,14 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
// Handle the SLURL callback if any
url_callback_t callback = LLWorldMapMessage::getInstance()->mSLURLCallback;
- if(callback != NULL)
+ if (callback != nullptr)
{
U64 handle = to_region_handle(x_world, y_world);
// Check if we reached the requested region
if ((LLStringUtil::compareInsensitive(LLWorldMapMessage::getInstance()->mSLURLRegionName, name)==0)
|| (LLWorldMapMessage::getInstance()->mSLURLRegionHandle == handle))
{
- LLWorldMapMessage::getInstance()->mSLURLCallback = NULL;
+ LLWorldMapMessage::getInstance()->mSLURLCallback = nullptr;
LLWorldMapMessage::getInstance()->mSLURLRegionName.clear();
LLWorldMapMessage::getInstance()->mSLURLRegionHandle = 0;
diff --git a/indra/newview/llworldmapmessage.h b/indra/newview/llworldmapmessage.h
index 357d31ccc1..87ae935bb9 100644
--- a/indra/newview/llworldmapmessage.h
+++ b/indra/newview/llworldmapmessage.h
@@ -27,7 +27,7 @@
#ifndef LL_LLWORLDMAPMESSAGE_H
#define LL_LLWORLDMAPMESSAGE_H
-#include "boost/function.hpp"
+#include <functional>
// Handling of messages (send and process) as well as SLURL callback if necessary
class LLMessageSystem;
@@ -38,7 +38,7 @@ class LLWorldMapMessage : public LLSingleton<LLWorldMapMessage>
~LLWorldMapMessage();
public:
- typedef boost::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)>
+ typedef std::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)>
url_callback_t;
// Process incoming answers to map stuff requests
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 29ca903256..b82a58163c 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -123,7 +123,7 @@ void LLCredential::authenticatorType(std::string &idType)
LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload,
- boost::function<void (const LLSD&, const LLSD&)> functor)
+ std::function<void (const LLSD&, const LLSD&)> functor)
{
return LLNotificationPtr((LLNotification*)NULL);
}
@@ -253,7 +253,7 @@ void LLProgressView::setMessage(std::string const &){}
// LLNotifications
class MockNotifications : public LLNotificationsInterface
{
- boost::function<void (const LLSD&, const LLSD&)> mResponder;
+ std::function<void (const LLSD&, const LLSD&)> mResponder;
int mAddedCount;
public: