diff --git a/indra/llmessage/fscorehttputil.cpp b/indra/llmessage/fscorehttputil.cpp index 1b7907a09d..a5ba78c363 100644 --- a/indra/llmessage/fscorehttputil.cpp +++ b/indra/llmessage/fscorehttputil.cpp @@ -57,7 +57,7 @@ void trivialPostCoroRaw(std::string url, if (!status) { // If a failure routine is provided do it. - if (!failure.empty()) + if (failure) { failure(httpResults); } @@ -65,7 +65,7 @@ void trivialPostCoroRaw(std::string url, else { // If a success routine is provided do it. - if (!success.empty()) + if (success) { success(result); } @@ -113,14 +113,14 @@ void trivialGetCoroRaw(std::string url, if (!status) { - if (!failure.empty()) + if (failure) { failure(httpResults); } } else { - if (!success.empty()) + if (success) { success(result); } @@ -155,14 +155,14 @@ void trivialGetCoro(std::string url, time_t last_modified, completionCallback_t if (!status) { - if (!failure.empty()) + if (failure) { failure(httpResults); } } else { - if (!success.empty()) + if (success) { success(result); } diff --git a/indra/llmessage/fscorehttputil.h b/indra/llmessage/fscorehttputil.h index e00a682acd..6a7a8d5e91 100644 --- a/indra/llmessage/fscorehttputil.h +++ b/indra/llmessage/fscorehttputil.h @@ -32,7 +32,7 @@ namespace FSCoreHttpUtil { - typedef boost::function completionCallback_t; + typedef std::function completionCallback_t; void callbackHttpPostRaw(const std::string& url, std::string postData, completionCallback_t success = {}, completionCallback_t failure = {}, LLCore::HttpHeaders::ptr_t aHeader = LLCore::HttpHeaders::ptr_t(), LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t()); diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 362d323302..18167fc1b9 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -45,7 +45,7 @@ public: typedef std::function account_name_changed_callback_t; // Contact sets - typedef boost::function custom_name_check_callback_t; + typedef std::function custom_name_check_callback_t; void setCustomNameCheckCallback(custom_name_check_callback_t cb) { mCustomNameCheckCallback = cb; diff --git a/indra/llui/llfiltereditor.cpp b/indra/llui/llfiltereditor.cpp index 1ce8a6d9d0..9fd8bf4c23 100644 --- a/indra/llui/llfiltereditor.cpp +++ b/indra/llui/llfiltereditor.cpp @@ -46,7 +46,7 @@ void LLFilterEditor::handleKeystroke() } // Allow any UICtrl to override the transparency with a callback -void LLFilterEditor::setTransparencyOverrideCallback(boost::function cb) +void LLFilterEditor::setTransparencyOverrideCallback(std::function cb) { // Simply setting it on the LLFilterEditor object doesn't work mSearchEditor->setTransparencyOverrideCallback(cb); diff --git a/indra/llui/llfiltereditor.h b/indra/llui/llfiltereditor.h index 76a633eb45..16a388b703 100644 --- a/indra/llui/llfiltereditor.h +++ b/indra/llui/llfiltereditor.h @@ -46,7 +46,7 @@ public: virtual ~LLFilterEditor() {} // Allow any UICtrl to override the transparency with a callback - void setTransparencyOverrideCallback(boost::function cb) override; + void setTransparencyOverrideCallback(std::function cb) override; // protected: diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h index 9133874468..a101aaf5a4 100644 --- a/indra/llui/llfloaterreg.h +++ b/indra/llui/llfloaterreg.h @@ -47,7 +47,7 @@ class LLUICtrl; typedef std::function LLFloaterBuildFunc; // [SL:KB] - Patch: UI-Base | Checked: 2010-12-01 (Catznip-3.0.0a) | Added: Catznip-2.4.0g -typedef boost::function LLFloaterFileFunc; +typedef std::function LLFloaterFileFunc; // [/SL:KB] class LLFloaterReg diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 5661cbf7c0..cfcbd58e1a 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -194,7 +194,7 @@ void LLLayoutPanel::handleReshape(const LLRect& new_rect, bool by_user) LLPanel::handleReshape(new_rect, by_user); // Add callback for reshaping - if (!mReshapePanelCallback.empty()) + if (mReshapePanelCallback) { mReshapePanelCallback(this, new_rect); } diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 90d5b28e43..935ec31f13 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -205,7 +205,7 @@ public: void setIgnoreReshape(bool ignore) { mIgnoreReshape = ignore; } // Add callback for reshaping - typedef boost::function reshape_panel_callback_t; + typedef std::function reshape_panel_callback_t; void setReshapePanelCallback(reshape_panel_callback_t cb) { mReshapePanelCallback = cb; } // diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 4970e62203..977ae25140 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -203,7 +203,7 @@ public: /*virtual*/ bool setLabelArg(const std::string& key, const LLStringExplicit& text) override; // FIRE-11373: Autoreplace doesn't work in nearby chat bar - typedef boost::function autoreplace_callback_t; + typedef std::function autoreplace_callback_t; autoreplace_callback_t mAutoreplaceCallback; void setAutoreplaceCallback (autoreplace_callback_t cb) { mAutoreplaceCallback = cb; } // FIRE-11373 diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 7ca613ec38..9eb006818f 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -240,8 +240,8 @@ public: ETypeTransparency getTransparencyType() const {return mTransparencyType;} // Allow any UICtrl to override the transparency with a callback - boost::function mTransparencyOverrideCallback; - virtual void setTransparencyOverrideCallback(boost::function cb) { mTransparencyOverrideCallback = cb; } + std::function mTransparencyOverrideCallback; + virtual void setTransparencyOverrideCallback(std::function cb) { mTransparencyOverrideCallback = cb; } // bool focusNextItem(bool text_entry_only); diff --git a/indra/newview/exoflickr.h b/indra/newview/exoflickr.h index 8d4c485d14..83b1039d6f 100644 --- a/indra/newview/exoflickr.h +++ b/indra/newview/exoflickr.h @@ -23,7 +23,7 @@ #include "llimage.h" #include "llsd.h" -#include +#include // This include file defines the API key/secret. // It is generated by cmake. @@ -32,7 +32,7 @@ class exoFlickr { public: - typedef boost::function response_callback_t; + typedef std::function response_callback_t; static void request(const std::string& method, const LLSD& args, response_callback_t callback); static void uploadPhoto(const LLSD& args, LLImageFormatted *image, response_callback_t callback); diff --git a/indra/newview/exoflickrauth.h b/indra/newview/exoflickrauth.h index b1d497f64a..3966d3221b 100644 --- a/indra/newview/exoflickrauth.h +++ b/indra/newview/exoflickrauth.h @@ -17,14 +17,14 @@ * $/LicenseInfo$ */ -#include +#include // This class's function is described by the flow chart at // https://www.flickr.com/services/api/auth.oauth.html class exoFlickrAuth { public: - typedef boost::function authorized_callback_t; + typedef std::function authorized_callback_t; exoFlickrAuth(authorized_callback_t callback); ~exoFlickrAuth(); diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index 2521526440..0a62c10f98 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -97,7 +97,7 @@ FSFloaterIMTimer::FSFloaterIMTimer(FSFloaterIMTimer::callback_t callback) : bool FSFloaterIMTimer::tick() { - if (!mCallback.empty()) + if (mCallback) { mCallback(); } diff --git a/indra/newview/fsfloaterim.h b/indra/newview/fsfloaterim.h index 182f0d6ae3..ddd3aecab3 100644 --- a/indra/newview/fsfloaterim.h +++ b/indra/newview/fsfloaterim.h @@ -310,7 +310,7 @@ private: class FSFloaterIMTimer : public LLEventTimer { public: - typedef boost::function callback_t; + typedef std::function callback_t; FSFloaterIMTimer(callback_t callback); /*virtual*/ bool tick(); diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index cd9934dc41..3a327d6361 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -2842,7 +2842,7 @@ bool FSLoadPoseTimer::tick() { if (!mAttemptLoading) return false; - if (mCallback.empty()) + if (!mCallback) return false; if (mLoadAttempts >= mMaxLoadAttempts) diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h index 8d289f53f7..eb7be52002 100644 --- a/indra/newview/fsfloaterposer.h +++ b/indra/newview/fsfloaterposer.h @@ -538,7 +538,7 @@ public: class FSLoadPoseTimer : public LLEventTimer { public: - typedef boost::function callback_t; + typedef std::function callback_t; FSLoadPoseTimer(callback_t callback); /*virtual*/ bool tick(); diff --git a/indra/newview/fsgridhandler.h b/indra/newview/fsgridhandler.h index 2e3fcd1329..14d03ff5f4 100644 --- a/indra/newview/fsgridhandler.h +++ b/indra/newview/fsgridhandler.h @@ -29,10 +29,10 @@ #ifndef FS_GRIDHANDLER_H #define FS_GRIDHANDLER_H -#include "../llxml/llxmlnode.h" +#include "llxmlnode.h" #include "llsingleton.h" -#include +#include #include extern const char* DEFAULT_LOGIN_PAGE; @@ -69,9 +69,6 @@ const std::string GRID_MESSAGE = "message"; const std::string GRID_SLURL_BASE = "slurl_base"; const std::string GRID_APP_SLURL_BASE = "app_slurl_base"; -// Inworldz special -#define INWORLDZ_URI "inworldz.com:8002" - class GridInfoRequestResponder; struct GridEntry @@ -227,7 +224,7 @@ public: } bool isSystemGrid() const { return isSystemGrid(mGrid); } - typedef boost::function grid_list_changed_callback_t; + typedef std::function grid_list_changed_callback_t; typedef boost::signals2::signal grid_list_changed_signal_t; boost::signals2::connection addGridListChangedCallback(grid_list_changed_callback_t cb); diff --git a/indra/newview/fspanelradar.cpp b/indra/newview/fspanelradar.cpp index 2d9c546549..fef27c0a02 100644 --- a/indra/newview/fspanelradar.cpp +++ b/indra/newview/fspanelradar.cpp @@ -298,7 +298,7 @@ void FSPanelRadar::requestUpdate() void FSPanelRadar::updateList(const std::vector& entries, const LLSD& stats) { - if (!mVisibleCheckFunction.empty() && !mVisibleCheckFunction()) + if (!mVisibleCheckFunction) { return; } diff --git a/indra/newview/fspanelradar.h b/indra/newview/fspanelradar.h index 5eb8358885..72667f7f03 100644 --- a/indra/newview/fspanelradar.h +++ b/indra/newview/fspanelradar.h @@ -62,7 +62,7 @@ public: return mChangeSignal.connect(cb); } - typedef boost::function visible_check_function_t; + typedef std::function visible_check_function_t; void setVisibleCheckFunction(const visible_check_function_t& func) { mVisibleCheckFunction = func; diff --git a/indra/newview/fsparticipantlist.h b/indra/newview/fsparticipantlist.h index e206d2d72c..0abf31cab4 100644 --- a/indra/newview/fsparticipantlist.h +++ b/indra/newview/fsparticipantlist.h @@ -52,7 +52,7 @@ public: CONV_SESSION_UNKNOWN = 6 }; - typedef boost::function validate_speaker_callback_t; + typedef std::function validate_speaker_callback_t; FSParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, diff --git a/indra/newview/fsscrolllistctrl.h b/indra/newview/fsscrolllistctrl.h index fb84e7ad3a..7e66738ec6 100644 --- a/indra/newview/fsscrolllistctrl.h +++ b/indra/newview/fsscrolllistctrl.h @@ -80,7 +80,7 @@ public: void refreshLineHeight(); - typedef boost::function handle_dad_callback_signal_t; + typedef std::function handle_dad_callback_signal_t; void setHandleDaDCallback(const handle_dad_callback_signal_t& func) { mHandleDaDCallback = func; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 1d6b61eef4..4fde7617bc 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -144,7 +144,7 @@ static bool have_script_upload_cap(LLUUID& object_id) class LLCallbackTimer : public LLEventTimer { public: - typedef boost::function bool_func_t; + typedef std::function bool_func_t; public: LLCallbackTimer(F32 nPeriod, bool_func_t cb) : LLEventTimer(nPeriod), m_Callback(cb) {} /*virtual*/ bool tick() { return m_Callback(); } diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 001a7515e9..fa44b56df2 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -142,7 +142,7 @@ public: void clearDebugText(); // Import - typedef boost::function new_object_callback_t; + typedef std::function new_object_callback_t; typedef boost::signals2::signal new_object_signal_t; boost::signals2::connection setNewObjectCallback(new_object_callback_t cb); new_object_signal_t mNewObjectSignal; diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index 2599dfbf06..e9f99ef9ce 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -1054,7 +1054,7 @@ RlvCommandOptionGetPath::RlvCommandOptionGetPath(const RlvCommand& rlvCmd, getpa if (pObj->isAttachment()) m_idItems.push_back(pObj->getAttachmentItemID()); } - else if (!cb.empty()) + else if (cb) { new RlvCommandOptionGetPathCallback(rlvCmd.getObjectID(), cb); m_fCallback = true; @@ -1067,7 +1067,7 @@ RlvCommandOptionGetPath::RlvCommandOptionGetPath(const RlvCommand& rlvCmd, getpa return; } - if (!cb.empty()) + if (cb) { cb(getItemIDs()); } diff --git a/indra/newview/rlvhelper.h b/indra/newview/rlvhelper.h index 34f9813a67..9b155b1c91 100644 --- a/indra/newview/rlvhelper.h +++ b/indra/newview/rlvhelper.h @@ -410,7 +410,7 @@ protected: struct RlvCommandOptionGetPath : public RlvCommandOption { - typedef boost::function getpath_callback_t; + typedef std::function getpath_callback_t; RlvCommandOptionGetPath(const RlvCommand& rlvCmd, getpath_callback_t cb = NULL); bool isCallback() const { return m_fCallback; } @@ -662,7 +662,7 @@ public: class RlvCallbackTimerOnce : public LLEventTimer { public: - typedef boost::function nullary_func_t; + typedef std::function nullary_func_t; public: RlvCallbackTimerOnce(F32 nPeriod, nullary_func_t cb) : LLEventTimer(nPeriod), m_Callback(cb) {} /*virtual*/ bool tick() diff --git a/indra/newview/rlvui.h b/indra/newview/rlvui.h index 6df15694a4..716fc30690 100644 --- a/indra/newview/rlvui.h +++ b/indra/newview/rlvui.h @@ -89,7 +89,7 @@ public: * Member variables */ protected: - typedef boost::function behaviour_handler_t; + typedef std::function behaviour_handler_t; typedef std::multimap behaviour_handler_map_t; behaviour_handler_map_t m_Handlers;