1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

ID should be always outputted as number (not char).

This commit is contained in:
Michał W. Urbańczyk 2013-04-17 19:09:54 +00:00
parent 45fccfb1a6
commit 850f47261d

View File

@ -168,7 +168,8 @@ std::ostream & operator << (std::ostream & os, BaseForID<Der, Num> id);
template<typename Der, typename Num>
std::ostream & operator << (std::ostream & os, BaseForID<Der, Num> id)
{
return os << id.getNum();
//We use common type with short to force char and unsigned char to be promoted and formatted as numbers.
return os << boost::common_type<short, Num>::type(id.getNum());
}
class ArtifactInstanceID : public BaseForID<ArtifactInstanceID, si32>