1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

- Fixed mantis #1576 (doesn't hang game)

- Implemented output stream operator<< for various classes(BattleAction, BattleHex,...) to improve debugging and logging
This commit is contained in:
beegee1
2013-11-09 16:25:20 +00:00
parent 55577d0ac4
commit e01ef8e36a
8 changed files with 66 additions and 5 deletions

View File

@ -158,3 +158,8 @@ BattleHex BattleHex::getClosestTile(bool attackerOwned, BattleHex initialPos, st
return sortedTiles.front();
}
std::ostream & operator<<(std::ostream & os, const BattleHex & hex)
{
return os << boost::str(boost::format("[BattleHex: x '%d', y '%d', hex '%d']") % hex.getX() % hex.getY() % hex.hex);
}