Added <<ostream operator for GalaxyType
This commit is contained in:
parent
ccd60eeda4
commit
92bbdb35db
|
@ -307,3 +307,9 @@ GalaxyList* ReadGalaxyList(istream& in)
|
|||
|
||||
return galaxies;
|
||||
}
|
||||
|
||||
|
||||
ostream& operator<<(ostream& s, const Galaxy::GalaxyType& sc)
|
||||
{
|
||||
return s << GalaxyTypeNames[static_cast<int>(sc)].name;
|
||||
}
|
||||
|
|
|
@ -75,4 +75,6 @@ typedef std::vector<Galaxy*> GalaxyList;
|
|||
|
||||
GalaxyList* ReadGalaxyList(std::istream& in);
|
||||
|
||||
std::ostream& operator<<(std::ostream& s, const Galaxy::GalaxyType& sc);
|
||||
|
||||
#endif // _GALAXY_H_
|
||||
|
|
Loading…
Reference in a new issue