diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-10 14:33:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-10 14:33:00 +0300 |
commit | aae328e272cdec136a1367cf83a5873a6b4963a9 (patch) | |
tree | 8388d89d96aca4be2fb506d7978c2d846a05307b /src | |
parent | 26146784b5a41dd77d31d7713260c1343b575677 (diff) | |
download | manaplus-aae328e272cdec136a1367cf83a5873a6b4963a9.tar.gz manaplus-aae328e272cdec136a1367cf83a5873a6b4963a9.tar.bz2 manaplus-aae328e272cdec136a1367cf83a5873a6b4963a9.tar.xz manaplus-aae328e272cdec136a1367cf83a5873a6b4963a9.zip |
Fix compilation errors with stlport.
Diffstat (limited to 'src')
-rw-r--r-- | src/actorspritemanager.cpp | 8 | ||||
-rw-r--r-- | src/client.cpp | 1 | ||||
-rw-r--r-- | src/gui/whoisonline.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 12 | ||||
-rw-r--r-- | src/guichan/basiccontainer.cpp | 4 | ||||
-rw-r--r-- | src/inputmanager.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/playerrelations.cpp | 4 |
9 files changed, 23 insertions, 20 deletions
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp index ae644c3cd..4cbf157ff 100644 --- a/src/actorspritemanager.cpp +++ b/src/actorspritemanager.cpp @@ -308,7 +308,7 @@ Being *ActorSpriteManager::findBeing(const int x, const int y, beingFinder.y = static_cast<uint16_t>(y); beingFinder.type = type; - const ActorSpritesConstIterator it = find_if( + const ActorSpritesConstIterator it = std::find_if( mActors.begin(), mActors.end(), beingFinder); return (it == mActors.end()) ? nullptr : static_cast<Being*>(*it); @@ -957,7 +957,7 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const beingSorter.attackBeings = nullptr; beingSorter.priorityBeings = nullptr; } - sort(sortedBeings.begin(), sortedBeings.end(), beingSorter); + std::sort(sortedBeings.begin(), sortedBeings.end(), beingSorter); if (filtered) { beingSorter.attackBeings = nullptr; @@ -978,8 +978,8 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const } beingEqualFinder.findBeing = player_node->getTarget(); - std::vector<Being*>::const_iterator i = find_if(sortedBeings.begin(), - sortedBeings.end(), beingEqualFinder); + std::vector<Being*>::const_iterator i = std::find_if( + sortedBeings.begin(), sortedBeings.end(), beingEqualFinder); if (i == sortedBeings.end() || ++i == sortedBeings.end()) { diff --git a/src/client.cpp b/src/client.cpp index 66a895264..7a66c445d 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -118,6 +118,7 @@ #include <iostream> #include <fstream> +#include <locale.h> #include "mumblemanager.h" diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp index 962a0993b..68ea0f67b 100644 --- a/src/gui/whoisonline.cpp +++ b/src/gui/whoisonline.cpp @@ -194,9 +194,9 @@ void WhoIsOnline::updateWindow(std::vector<OnlinePlayer*> &friends, setCaption(_("Who Is Online - ") + toString(numOnline)); //List the online people - sort(friends.begin(), friends.end(), nameCompare); - sort(neutral.begin(), neutral.end(), nameCompare); - sort(disregard.begin(), disregard.end(), nameCompare); + std::sort(friends.begin(), friends.end(), nameCompare); + std::sort(neutral.begin(), neutral.end(), nameCompare); + std::sort(disregard.begin(), disregard.end(), nameCompare); bool addedFromSection(false); for (size_t i = 0, sz = friends.size(); i < sz; i++) { diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 18a9df3e2..cac2a53f2 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -319,7 +319,7 @@ void BrowserBox::mousePressed(gcn::MouseEvent &event) if (!mLinkHandler) return; - const LinkIterator i = find_if(mLinks.begin(), mLinks.end(), + const LinkIterator i = std::find_if(mLinks.begin(), mLinks.end(), MouseOverLink(event.getX(), event.getY())); if (i != mLinks.end()) @@ -328,7 +328,7 @@ void BrowserBox::mousePressed(gcn::MouseEvent &event) void BrowserBox::mouseMoved(gcn::MouseEvent &event) { - const LinkIterator i = find_if(mLinks.begin(), mLinks.end(), + const LinkIterator i = std::find_if(mLinks.begin(), mLinks.end(), MouseOverLink(event.getX(), event.getY())); mSelectedLink = (i != mLinks.end()) diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 4ccfb566f..e12a15a6b 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -535,19 +535,21 @@ void ItemContainer::updateMatrix() default: break; case 1: - sort(sortedItems.begin(), sortedItems.end(), itemAlphaSorter); + std::sort(sortedItems.begin(), sortedItems.end(), itemAlphaSorter); break; case 2: - sort(sortedItems.begin(), sortedItems.end(), itemIdSorter); + std::sort(sortedItems.begin(), sortedItems.end(), itemIdSorter); break; case 3: - sort(sortedItems.begin(), sortedItems.end(), itemWeightSorter); + std::sort(sortedItems.begin(), sortedItems.end(), + itemWeightSorter); break; case 4: - sort(sortedItems.begin(), sortedItems.end(), itemAmountSorter); + std::sort(sortedItems.begin(), sortedItems.end(), + itemAmountSorter); break; case 5: - sort(sortedItems.begin(), sortedItems.end(), itemTypeSorter); + std::sort(sortedItems.begin(), sortedItems.end(), itemTypeSorter); break; } diff --git a/src/guichan/basiccontainer.cpp b/src/guichan/basiccontainer.cpp index c2a5aa964..4598c4e8d 100644 --- a/src/guichan/basiccontainer.cpp +++ b/src/guichan/basiccontainer.cpp @@ -83,7 +83,7 @@ namespace gcn void BasicContainer::moveToBottom(Widget* widget) { WidgetListIterator iter; - iter = find(mWidgets.begin(), mWidgets.end(), widget); + iter = std::find(mWidgets.begin(), mWidgets.end(), widget); if (iter == mWidgets.end()) throw GCN_EXCEPTION("There is no such widget in this container."); @@ -96,7 +96,7 @@ namespace gcn void BasicContainer::death(const Event& event) { WidgetListIterator iter; - iter = find(mWidgets.begin(), mWidgets.end(), event.getSource()); + iter = std::find(mWidgets.begin(), mWidgets.end(), event.getSource()); if (iter == mWidgets.end()) throw GCN_EXCEPTION("There is no such widget in this container."); diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp index e45cda6b1..244f9a9dd 100644 --- a/src/inputmanager.cpp +++ b/src/inputmanager.cpp @@ -645,7 +645,7 @@ void InputManager::updateKeyActionMap(KeyToActionMap &actionMap, { KeysVector *const keys = &it->second; if (keys && keys->size() > 1) - sort(keys->begin(), keys->end(), keySorter); + std::sort(keys->begin(), keys->end(), keySorter); } } diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index e8c9dfaff..039010535 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -180,7 +180,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, PlayerInfoBackend &data = character->data; data.mAttributes[PlayerInfo::EXP] = msg.readInt32(); data.mAttributes[PlayerInfo::MONEY] = msg.readInt32(); - Stat &jobStat = data.mStats[JOB]; + Stat &jobStat = data.mStats[static_cast<size_t>(JOB)]; jobStat.exp = msg.readInt32(); const int temp = msg.readInt32(); diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp index 7e92feb5f..8483a7412 100644 --- a/src/playerrelations.cpp +++ b/src/playerrelations.cpp @@ -363,7 +363,7 @@ StringVect * PlayerRelationsManager::getPlayers() retval->push_back(it->first); } - sort(retval->begin(), retval->end(), playersSorter); + std::sort(retval->begin(), retval->end(), playersSorter); return retval; } @@ -380,7 +380,7 @@ StringVect *PlayerRelationsManager::getPlayersByRelation( retval->push_back(it->first); } - sort(retval->begin(), retval->end(), playersSorter); + std::sort(retval->begin(), retval->end(), playersSorter); return retval; } |