Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 316937 Details for
Bug 424193
games-strategy/vcmi-0.89.ebuild - a free HOMM 3 clone
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
The patch file for compiling under gcc 4.5
vcmi-0.89-compile-fix.patch (text/plain), 4.29 KB, created by
Weihua Zhou
on 2012-07-02 02:38:28 UTC
(
hide
)
Description:
The patch file for compiling under gcc 4.5
Filename:
MIME Type:
Creator:
Weihua Zhou
Created:
2012-07-02 02:38:28 UTC
Size:
4.29 KB
patch
obsolete
>diff -Nur vcmi-0.89.orig/Global.h vcmi-0.89/Global.h >--- vcmi-0.89.orig/Global.h 2012-05-28 03:06:35.000000000 +0800 >+++ vcmi-0.89/Global.h 2012-06-21 14:39:37.104980437 +0800 >@@ -330,7 +330,7 @@ > { > assert(r.size()); > index %= r.size(); >- auto itr = std::begin(r); >+ auto itr = r.begin(); > std::advance(itr, index); > return *itr; > } >diff -Nur vcmi-0.89.orig/lib/BattleState.cpp vcmi-0.89/lib/BattleState.cpp >--- vcmi-0.89.orig/lib/BattleState.cpp 2012-05-30 07:22:28.000000000 +0800 >+++ vcmi-0.89/lib/BattleState.cpp 2012-06-21 14:39:37.104980438 +0800 >@@ -2594,7 +2594,7 @@ > if(vstd::contains(obs->getAffectedTiles(), tile)) > return obs; > >- return NULL; >+ return shared_ptr<CObstacleInstance>(); > } > > const CStack * BattleInfo::getStackIf(boost::function<bool(const CStack*)> pred) const >diff -Nur vcmi-0.89.orig/lib/CGameState.cpp vcmi-0.89/lib/CGameState.cpp >--- vcmi-0.89.orig/lib/CGameState.cpp 2012-06-01 19:35:31.000000000 +0800 >+++ vcmi-0.89/lib/CGameState.cpp 2012-06-21 14:39:37.104980438 +0800 >@@ -648,7 +648,7 @@ > > //golem factory is not in list of cregens but can be placed as random object > static const int factoryCreatures[] = {32, 33, 116, 117}; >- std::vector<int> factory(std::begin(factoryCreatures), std::end(factoryCreatures)); >+ std::vector<int> factory(factoryCreatures, factoryCreatures + sizeof(factoryCreatures)/sizeof(*factoryCreatures) - 1); > if (vstd::contains(factory, cid)) > result = std::pair<int,int>(20, 1); > >diff -Nur vcmi-0.89.orig/lib/CObjectHandler.cpp vcmi-0.89/lib/CObjectHandler.cpp >--- vcmi-0.89.orig/lib/CObjectHandler.cpp 2012-05-19 19:47:26.000000000 +0800 >+++ vcmi-0.89/lib/CObjectHandler.cpp 2012-06-21 14:39:37.105980426 +0800 >@@ -2360,7 +2360,7 @@ > > bool CGTownInstance::addBonusIfBuilt(int building, int type, int val, int subtype /*= -1*/) > { >- return addBonusIfBuilt(building, type, val, NULL, subtype); >+ return addBonusIfBuilt(building, type, val, TPropagatorPtr(), subtype); > } > > bool CGTownInstance::addBonusIfBuilt(int building, int type, int val, TPropagatorPtr prop, int subtype /*= -1*/) >diff -Nur vcmi-0.89.orig/lib/CObstacleInstance.cpp vcmi-0.89/lib/CObstacleInstance.cpp >--- vcmi-0.89.orig/lib/CObstacleInstance.cpp 2012-05-19 04:50:16.000000000 +0800 >+++ vcmi-0.89/lib/CObstacleInstance.cpp 2012-06-21 14:39:37.106980413 +0800 >@@ -134,5 +134,5 @@ > { > //rrr... need initializer lists > static const BattleHex moatHexes[] = {11, 28, 44, 61, 77, 111, 129, 146, 164, 181}; >- return std::vector<BattleHex>(std::begin(moatHexes), std::end(moatHexes)); >-} >\ No newline at end of file >+ return std::vector<BattleHex>(moatHexes, moatHexes + sizeof(moatHexes)/sizeof(*moatHexes) - 1); >+} >diff -Nur vcmi-0.89.orig/lib/IGameCallback.cpp vcmi-0.89/lib/IGameCallback.cpp >--- vcmi-0.89.orig/lib/IGameCallback.cpp 2012-05-29 03:29:32.000000000 +0800 >+++ vcmi-0.89/lib/IGameCallback.cpp 2012-06-21 14:39:37.106980413 +0800 >@@ -416,7 +416,7 @@ > shared_ptr<const CObstacleInstance> CBattleInfoCallback::battleGetObstacleOnPos(BattleHex tile, bool onlyBlocking /*= true*/) > { > if(!gs->curB) >- return NULL; >+ return shared_ptr<const CObstacleInstance>(); > > BOOST_FOREACH(auto &obs, battleGetAllObstacles()) > { >@@ -426,7 +426,7 @@ > return obs; > } > } >- return NULL; >+ return shared_ptr<const CObstacleInstance>(); > } > > int CBattleInfoCallback::battleGetMoatDmg() >diff -Nur vcmi-0.89.orig/server/CGameHandler.cpp vcmi-0.89/server/CGameHandler.cpp >--- vcmi-0.89.orig/server/CGameHandler.cpp 2012-05-30 07:22:28.000000000 +0800 >+++ vcmi-0.89/server/CGameHandler.cpp 2012-06-21 14:39:37.107980400 +0800 >@@ -999,7 +999,7 @@ > { > // send one package with the creature path information > >- shared_ptr<const CObstacleInstance> obstacle = NULL; //obstacle that interrupted movement >+ shared_ptr<const CObstacleInstance> obstacle = shared_ptr<const CObstacleInstance>(); //obstacle that interrupted movement > std::vector<BattleHex> tiles; > int tilesToMove = std::max((int)(path.first.size() - creSpeed), 0); > int v = path.first.size()-1; >@@ -1036,7 +1036,7 @@ > //if stack didn't die in explosion, continue movement > if(!obstacle->stopsMovement() && curStack->alive()) > { >- obstacle = NULL; >+ obstacle = shared_ptr<const CObstacleInstance>(); > tiles.clear(); > v--; > goto startWalking; //TODO it's so evil
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 424193
:
316727
| 316937 |
316939
|
318592
|
318594
|
318596
|
380392