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:
parent
45fccfb1a6
commit
850f47261d
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user