mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
ID should be always outputted as number (not char).
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user