Skip to content

Commit

Permalink
Merge pull request #33053 from CleverRaven/fix-jenkins-gcc-builds-201…
Browse files Browse the repository at this point in the history
…9-08-08

Change enum class from char to int
  • Loading branch information
kevingranade authored Aug 9, 2019
2 parents aee7ee1 + adbabd4 commit c5f4659
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/active_item_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,22 @@ struct item_reference {
safe_reference<item> item_ref;
};

enum class special_item_type : char {
enum class special_item_type : int {
none,
corpse,
explosive
};

namespace std
{
template <>
struct hash<special_item_type> {
std::size_t operator()( const special_item_type &k ) const {
return static_cast<size_t>( k );
}
};
} // namespace std

class active_item_cache
{
private:
Expand Down
2 changes: 1 addition & 1 deletion src/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class zone_data;
struct trap;

enum direction : unsigned;
enum class special_item_type : char;
enum class special_item_type : int;
using itype_id = std::string;
template<typename T>
class visitable;
Expand Down

0 comments on commit c5f4659

Please sign in to comment.