Commit 69c1449f authored by Drake Arconis's avatar Drake Arconis
Browse files

Merge

parents f53ecf34 f686978f
......@@ -942,16 +942,16 @@ bool LLUICtrl::findHelpTopic(std::string& help_topic_out)
}
// *TODO: Deprecate; for backwards compatability only:
boost::signals2::connection LLUICtrl::setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data)
boost::signals2::connection LLUICtrl::setCommitCallback( std::function<void (LLUICtrl*,void*)> cb, void* data)
{
return setCommitCallback( boost::bind(cb, _1, data));
return setCommitCallback( std::bind(cb, std::placeholders::_1, data));
}
boost::signals2::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb )
boost::signals2::connection LLUICtrl::setValidateBeforeCommit( std::function<bool (const LLSD& data)> cb )
{
if (!mValidateSignal) mValidateSignal = new enable_signal_t();
claimMem(mValidateSignal);
return mValidateSignal->connect(boost::bind(cb, _2));
return mValidateSignal->connect(std::bind(cb, std::placeholders::_2));
}
// virtual
......
......@@ -249,8 +249,8 @@ public:
boost::signals2::connection setDoubleClickCallback( const mouse_signal_t::slot_type& cb );
// *TODO: Deprecate; for backwards compatability only:
boost::signals2::connection setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data);
boost::signals2::connection setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb );
boost::signals2::connection setCommitCallback( std::function<void (LLUICtrl*,void*)> cb, void* data);
boost::signals2::connection setValidateBeforeCommit( std::function<bool (const LLSD& data)> cb );
LLUICtrl* findRootMostFocusRoot();
......
......@@ -65,7 +65,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);
......
......@@ -102,7 +102,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);
};
......
......@@ -408,7 +408,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);
}
......
......@@ -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,
......
......@@ -83,7 +83,7 @@ public:
void onMouseLeave(S32 x, S32 y, MASK mask) override;
//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;
......
......@@ -107,10 +107,10 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mTentative(tentative),
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),
mNonImmediateFilterPermMask(non_immediate_filter_perm_mask),
......@@ -119,10 +119,10 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mCanApply(true),
mCanPreview(true),
mPreviewSettingChanged(false),
mOnFloaterCommitCallback(NULL),
mOnFloaterCloseCallback(NULL),
mSetImageAssetIDCallback(NULL),
mOnUpdateImageStatsCallback(NULL)
mOnFloaterCommitCallback(nullptr),
mOnFloaterCloseCallback(nullptr),
mSetImageAssetIDCallback(nullptr),
mOnUpdateImageStatsCallback(nullptr)
{
buildFromFile("floater_texture_ctrl.xml");
mCanApplyImmediately = can_apply_immediately;
......@@ -199,7 +199,7 @@ void LLFloaterTexturePicker::updateImageStats()
{
std::string formatted_dims = llformat("%d x %d", mTexturep->getFullWidth(),mTexturep->getFullHeight());
mResolutionLabel->setTextArg("[DIMENSIONS]", formatted_dims);
if (mOnUpdateImageStatsCallback)
if (mOnUpdateImageStatsCallback != nullptr)
{
mOnUpdateImageStatsCallback(mTexturep);
}
......@@ -309,7 +309,7 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask)
void LLFloaterTexturePicker::onClose(bool app_quitting)
{
if (mOwner && mOnFloaterCloseCallback)
if (mOwner && mOnFloaterCloseCallback != nullptr)
{
mOnFloaterCloseCallback();
}
......@@ -475,7 +475,7 @@ void LLFloaterTexturePicker::draw()
//BOOL allow_copy = FALSE;
if( mOwner )
{
mTexturep = NULL;
mTexturep = nullptr;
if(mImageAssetID.notNull())
{
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID);
......@@ -616,7 +616,7 @@ PermissionMask LLFloaterTexturePicker::getFilterPermMask()
void LLFloaterTexturePicker::commitIfImmediateSet()
{
if (!mNoCopyTextureSelected && mOnFloaterCommitCallback && mCanApply)
if (!mNoCopyTextureSelected && mOnFloaterCommitCallback != nullptr && mCanApply)
{
mOnFloaterCommitCallback(LLTextureCtrl::TEXTURE_CHANGE, LLUUID::null);
}
......@@ -624,7 +624,7 @@ void LLFloaterTexturePicker::commitIfImmediateSet()
void LLFloaterTexturePicker::commitCancel()
{
if (!mNoCopyTextureSelected && mOnFloaterCommitCallback && mCanApply)
if (!mNoCopyTextureSelected && mOnFloaterCommitCallback != nullptr && mCanApply)
{
mOnFloaterCommitCallback(LLTextureCtrl::TEXTURE_CANCEL, LLUUID::null);
}
......@@ -688,7 +688,7 @@ void LLFloaterTexturePicker::onBtnCancel(void* userdata)
{
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata;
self->setImageID( self->mOriginalImageAssetID );
if (self->mOnFloaterCommitCallback)
if (self->mOnFloaterCommitCallback != nullptr)
{
self->mOnFloaterCommitCallback(LLTextureCtrl::TEXTURE_CANCEL, LLUUID::null);
}
......@@ -709,7 +709,7 @@ void LLFloaterTexturePicker::onBtnSelect(void* userdata)
local_id = LLLocalBitmapMgr::getWorldID(temp_id);
}
}
if (self->mOnFloaterCommitCallback)
if (self->mOnFloaterCommitCallback != nullptr)
{
self->mOnFloaterCommitCallback(LLTextureCtrl::TEXTURE_SELECT, local_id);
}
......@@ -751,7 +751,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
mNoCopyTextureSelected = FALSE;
if (itemp)
{
if (mTextureSelectedCallback)
if (mTextureSelectedCallback != nullptr)
{
mTextureSelectedCallback(itemp);
}
......@@ -876,14 +876,14 @@ void LLFloaterTexturePicker::onLocalScrollCommit()
{
LLUUID tracking_id = LLUUID(mLocalScrollCtrl->getSelectedItemLabel(LOCAL_TRACKING_ID_COLUMN));
LLUUID inworld_id = LLLocalBitmapMgr::getWorldID(tracking_id);
if (mSetImageAssetIDCallback)
if (mSetImageAssetIDCallback != nullptr)
{
mSetImageAssetIDCallback(inworld_id);
}
if (childGetValue("apply_immediate_check").asBoolean())
{
if (mOnFloaterCommitCallback)
if (mOnFloaterCommitCallback != nullptr)
{
mOnFloaterCommitCallback(LLTextureCtrl::TEXTURE_CHANGE, inworld_id);
}
......@@ -1207,11 +1207,11 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
LLFloaterTexturePicker* texture_floaterp = dynamic_cast<LLFloaterTexturePicker*>(floaterp);
if (texture_floaterp)
{
if (mOnTextureSelectedCallback)
if (mOnTextureSelectedCallback != nullptr)
{
texture_floaterp->setTextureSelectedCallback(mOnTextureSelectedCallback);
}
if (mOnCloseCallback)
if (mOnCloseCallback != nullptr)
{
texture_floaterp->setOnFloaterCloseCallback(boost::bind(&LLTextureCtrl::onFloaterClose, this));
}
......@@ -1236,7 +1236,7 @@ void LLTextureCtrl::closeDependentFloater()
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if( floaterp )
{
floaterp->setOwner(NULL);
floaterp->setOwner(nullptr);
floaterp->closeFloater();
}
}
......@@ -1292,11 +1292,11 @@ void LLTextureCtrl::onFloaterClose()
if (floaterp)
{
if (mOnCloseCallback)
if (mOnCloseCallback != nullptr)
{
mOnCloseCallback(this,LLSD());
}
floaterp->setOwner(NULL);
floaterp->setOwner(nullptr);
}
mFloaterHandle.markDead();
......@@ -1333,11 +1333,11 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLUUID id)
LL_DEBUGS() << "mImageAssetID: " << mImageAssetID << LL_ENDL;
}
if (op == TEXTURE_SELECT && mOnSelectCallback)
if (op == TEXTURE_SELECT && mOnSelectCallback != nullptr)
{
mOnSelectCallback( this, LLSD() );
}
else if (op == TEXTURE_CANCEL && mOnCancelCallback)
else if (op == TEXTURE_CANCEL && mOnCancelCallback != nullptr)
{
mOnCancelCallback( this, LLSD() );
}
......@@ -1442,7 +1442,7 @@ void LLTextureCtrl::draw()
if (!mValid)
{
mTexturep = NULL;
mTexturep = nullptr;
}
else if (!mImageAssetID.isNull())
{
......@@ -1455,7 +1455,7 @@ void LLTextureCtrl::draw()
}
else//mImageAssetID == LLUUID::null
{
mTexturep = NULL;
mTexturep = nullptr;
}
// Border
......@@ -1560,7 +1560,7 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item)
PermissionMask filter_perm_mask = mImmediateFilterPermMask;
if ( (item_perm_mask & filter_perm_mask) == filter_perm_mask )
{
if(mDragCallback)
if(mDragCallback != nullptr)
{
return mDragCallback(this, item);
}
......@@ -1578,7 +1578,7 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item)
BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
{
// call the callback if it exists.
if(mDropCallback)
if(mDropCallback != nullptr)
{
// if it returns TRUE, we return TRUE, and therefore the
// commit is called above.
......
......@@ -244,10 +244,10 @@ private:
//////////////////////////////////////////////////////////////////////////////////////////
// LLFloaterTexturePicker
typedef boost::function<void(LLTextureCtrl::ETexturePickOp op, LLUUID 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, LLUUID 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
{
......
......@@ -154,7 +154,7 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, std::
if (!status)
bOk = false;
if (!fnc.empty())
if (fnc != nullptr)
fnc(service, bOk);
}
......@@ -208,7 +208,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
......@@ -219,7 +219,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);
}
......
......@@ -56,9 +56,9 @@ public :
SERVICE_GOOGLE,
} EService;
typedef boost::function<void(EService, bool)> 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)> KeyVerificationResult_fn;
typedef std::function<void(std::string , std::string )> TranslationSuccess_fn;
typedef std::function<void(int, std::string)> TranslationFailure_fn;
/**
* Translate given text.
......
......@@ -165,8 +165,8 @@ private:
class LLBufferedAssetUploadInfo : public LLResourceUploadInfo
{
public:
typedef boost::function<void(LLUUID itemId, LLUUID newAssetId, LLUUID newItemId, LLSD response)> invnUploadFinish_f;
typedef boost::function<void(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response)> taskUploadFinish_f;
typedef std::function<void(LLUUID itemId, LLUUID newAssetId, LLUUID newItemId, LLSD response)> invnUploadFinish_f;
typedef std::function<void(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response)> taskUploadFinish_f;
LLBufferedAssetUploadInfo(LLUUID itemId, LLAssetType::EType assetType, std::string buffer, invnUploadFinish_f finish);
LLBufferedAssetUploadInfo(LLUUID itemId, LLPointer<LLImageFormatted> image, invnUploadFinish_f finish);
......
......@@ -306,7 +306,7 @@ protected:
typedef boost::shared_ptr<sessionState> ptr_t;
typedef boost::weak_ptr<sessionState> wptr_t;
typedef boost::function<void(const ptr_t &)> sessionFunc_t;
typedef std::function<void(const ptr_t &)> sessionFunc_t;
static ptr_t createSession();
~sessionState();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment