forked from mirror/openmw-tes3mp
replace and purge boost::function
This commit is contained in:
parent
d48b829b45
commit
154d7cffa2
7 changed files with 20 additions and 29 deletions
|
@ -892,7 +892,7 @@ public:
|
|||
Style* mFocusItem;
|
||||
bool mItemActive;
|
||||
MyGUI::MouseButton mLastDown;
|
||||
boost::function <void (intptr_t)> mLinkClicked;
|
||||
std::function <void (intptr_t)> mLinkClicked;
|
||||
|
||||
|
||||
std::shared_ptr <TypesetBookImpl> mBook;
|
||||
|
@ -1260,14 +1260,14 @@ public:
|
|||
mPageDisplay->showPage (book, page);
|
||||
}
|
||||
|
||||
void adviseLinkClicked (boost::function <void (InteractiveId)> linkClicked)
|
||||
void adviseLinkClicked (std::function <void (InteractiveId)> linkClicked)
|
||||
{
|
||||
mPageDisplay->mLinkClicked = linkClicked;
|
||||
}
|
||||
|
||||
void unadviseLinkClicked ()
|
||||
{
|
||||
mPageDisplay->mLinkClicked = boost::function <void (InteractiveId)> ();
|
||||
mPageDisplay->mLinkClicked = std::function <void (InteractiveId)> ();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include <functional>
|
||||
#include <stdint.h>
|
||||
#include <boost/function.hpp>
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
@ -101,7 +100,7 @@ namespace MWGui
|
|||
public:
|
||||
|
||||
typedef TypesetBook::InteractiveId InteractiveId;
|
||||
typedef boost::function <void (InteractiveId)> ClickCallback;
|
||||
typedef std::function <void (InteractiveId)> ClickCallback;
|
||||
|
||||
/// Make the widget display the specified page from the specified book.
|
||||
virtual void showPage (TypesetBook::Ptr Book, size_t Page) = 0;
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
#include <MyGUI_LanguageManager.h>
|
||||
|
||||
#include <components/misc/utf8stream.hpp>
|
||||
|
||||
#include <components/translation/translation.hpp>
|
||||
|
||||
#include "../mwbase/world.hpp"
|
||||
|
@ -149,7 +147,7 @@ struct JournalViewModelImpl : JournalViewModel
|
|||
return toUtf8Span (utf8text);
|
||||
}
|
||||
|
||||
void visitSpans (boost::function < void (TopicId, size_t, size_t)> visitor) const
|
||||
void visitSpans (std::function < void (TopicId, size_t, size_t)> visitor) const
|
||||
{
|
||||
ensureLoaded ();
|
||||
mModel->ensureKeyWordSearchLoaded ();
|
||||
|
@ -193,7 +191,7 @@ struct JournalViewModelImpl : JournalViewModel
|
|||
|
||||
};
|
||||
|
||||
void visitQuestNames (bool active_only, boost::function <void (const std::string&, bool)> visitor) const
|
||||
void visitQuestNames (bool active_only, std::function <void (const std::string&, bool)> visitor) const
|
||||
{
|
||||
MWBase::Journal * journal = MWBase::Environment::get ().getJournal ();
|
||||
|
||||
|
@ -268,7 +266,7 @@ struct JournalViewModelImpl : JournalViewModel
|
|||
}
|
||||
};
|
||||
|
||||
void visitJournalEntries (const std::string& questName, boost::function <void (JournalEntry const &)> visitor) const
|
||||
void visitJournalEntries (const std::string& questName, std::function <void (JournalEntry const &)> visitor) const
|
||||
{
|
||||
MWBase::Journal * journal = MWBase::Environment::get().getJournal();
|
||||
|
||||
|
@ -301,13 +299,13 @@ struct JournalViewModelImpl : JournalViewModel
|
|||
}
|
||||
}
|
||||
|
||||
void visitTopicName (TopicId topicId, boost::function <void (Utf8Span)> visitor) const
|
||||
void visitTopicName (TopicId topicId, std::function <void (Utf8Span)> visitor) const
|
||||
{
|
||||
MWDialogue::Topic const & topic = * reinterpret_cast <MWDialogue::Topic const *> (topicId);
|
||||
visitor (toUtf8Span (topic.getName()));
|
||||
}
|
||||
|
||||
void visitTopicNamesStartingWith (char character, boost::function < void (const std::string&) > visitor) const
|
||||
void visitTopicNamesStartingWith (char character, std::function < void (const std::string&) > visitor) const
|
||||
{
|
||||
MWBase::Journal * journal = MWBase::Environment::get().getJournal();
|
||||
|
||||
|
@ -341,7 +339,7 @@ struct JournalViewModelImpl : JournalViewModel
|
|||
|
||||
};
|
||||
|
||||
void visitTopicEntries (TopicId topicId, boost::function <void (TopicEntry const &)> visitor) const
|
||||
void visitTopicEntries (TopicId topicId, std::function <void (TopicEntry const &)> visitor) const
|
||||
{
|
||||
typedef MWDialogue::Topic::TEntryIter iterator_t;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include <memory>
|
||||
#include <functional>
|
||||
#include <stdint.h>
|
||||
#include <boost/function.hpp>
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
@ -37,7 +36,7 @@ namespace MWGui
|
|||
/// Visits each subset of text in the body, delivering the beginning
|
||||
/// and end of the span relative to the body, and a valid topic ID if
|
||||
/// the span represents a keyword, or zero if not.
|
||||
virtual void visitSpans (boost::function <void (TopicId, size_t, size_t)> visitor) const = 0;
|
||||
virtual void visitSpans (std::function <void (TopicId, size_t, size_t)> visitor) const = 0;
|
||||
};
|
||||
|
||||
/// An interface to topic data.
|
||||
|
@ -67,20 +66,20 @@ namespace MWGui
|
|||
virtual bool isEmpty () const = 0;
|
||||
|
||||
/// walks the active and optionally completed, quests providing the name and completed status
|
||||
virtual void visitQuestNames (bool active_only, boost::function <void (const std::string&, bool)> visitor) const = 0;
|
||||
virtual void visitQuestNames (bool active_only, std::function <void (const std::string&, bool)> visitor) const = 0;
|
||||
|
||||
/// walks over the journal entries related to all quests with the given name
|
||||
/// If \a questName is empty, simply visits all journal entries
|
||||
virtual void visitJournalEntries (const std::string& questName, boost::function <void (JournalEntry const &)> visitor) const = 0;
|
||||
virtual void visitJournalEntries (const std::string& questName, std::function <void (JournalEntry const &)> visitor) const = 0;
|
||||
|
||||
/// provides the name of the topic specified by its id
|
||||
virtual void visitTopicName (TopicId topicId, boost::function <void (Utf8Span)> visitor) const = 0;
|
||||
virtual void visitTopicName (TopicId topicId, std::function <void (Utf8Span)> visitor) const = 0;
|
||||
|
||||
/// walks over the topics whose names start with the specified character providing the topics name
|
||||
virtual void visitTopicNamesStartingWith (char character, boost::function < void (const std::string&) > visitor) const = 0;
|
||||
virtual void visitTopicNamesStartingWith (char character, std::function < void (const std::string&) > visitor) const = 0;
|
||||
|
||||
/// walks over the topic entries for the topic specified by its identifier
|
||||
virtual void visitTopicEntries (TopicId topicId, boost::function <void (TopicEntry const &)> visitor) const = 0;
|
||||
virtual void visitTopicEntries (TopicId topicId, std::function <void (TopicEntry const &)> visitor) const = 0;
|
||||
|
||||
// create an instance of the default journal view model implementation
|
||||
static Ptr create ();
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
#include <MyGUI_TextBox.h>
|
||||
#include <MyGUI_Button.h>
|
||||
|
||||
#include <boost/function.hpp>
|
||||
|
||||
#include <components/misc/stringops.hpp>
|
||||
#include <components/widgets/imagebutton.hpp>
|
||||
#include <components/widgets/list.hpp>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "tradewindow.hpp"
|
||||
|
||||
#include <climits>
|
||||
|
||||
#include <MyGUI_Button.h>
|
||||
#include <MyGUI_InputManager.h>
|
||||
#include <MyGUI_ControllerManager.h>
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
#include "lightmanager.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include <osg/NodeVisitor>
|
||||
|
||||
#include <osgUtil/CullVisitor>
|
||||
|
||||
#include <components/sceneutil/util.hpp>
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
||||
namespace SceneUtil
|
||||
{
|
||||
|
||||
|
@ -220,7 +214,8 @@ namespace SceneUtil
|
|||
// possible optimization: return a StateSet containing all requested lights plus some extra lights (if a suitable one exists)
|
||||
size_t hash = 0;
|
||||
for (unsigned int i=0; i<lightList.size();++i)
|
||||
boost::hash_combine(hash, lightList[i]->mLightSource->getId());
|
||||
hash = hash ^ (lightList[i]->mLightSource->getId() << 1); // or use boost::hash_combine
|
||||
// original: boost::hash_combine(hash, lightList[i]->mLightSource->getId());
|
||||
|
||||
LightStateSetMap& stateSetCache = mStateSetCache[frameNum%2];
|
||||
|
||||
|
|
Loading…
Reference in a new issue