mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
gcc compile fix
This commit is contained in:
parent
850f47261d
commit
857274a670
@ -169,7 +169,8 @@ template<typename Der, typename Num>
|
|||||||
std::ostream & operator << (std::ostream & os, BaseForID<Der, Num> id)
|
std::ostream & operator << (std::ostream & os, BaseForID<Der, Num> id)
|
||||||
{
|
{
|
||||||
//We use common type with short to force char and unsigned char to be promoted and formatted as numbers.
|
//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());
|
typedef typename std::common_type<short, Num>::type Number;
|
||||||
|
return os << static_cast<Number>(id.getNum());
|
||||||
}
|
}
|
||||||
|
|
||||||
class ArtifactInstanceID : public BaseForID<ArtifactInstanceID, si32>
|
class ArtifactInstanceID : public BaseForID<ArtifactInstanceID, si32>
|
||||||
|
Loading…
Reference in New Issue
Block a user