Fix compilation on Mac M1 (#7582)

Fixes #7557

Thanks to @vietlubu
This commit is contained in:
Lemongrass3110 2023-02-07 09:23:33 +01:00 committed by GitHub
parent ba32ccc928
commit 59a722234d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ uint64 CashShopDatabase::parseBodyNode( const ryml::NodeRef& node ){
e_cash_shop_tab tab = static_cast<e_cash_shop_tab>( constant );
std::shared_ptr<s_cash_item_tab> entry = this->find( tab );
std::shared_ptr<s_cash_item_tab> entry = this->find( static_cast<uint16>( tab ) );
bool exists = entry != nullptr;
if( !exists ){
@ -113,14 +113,14 @@ uint64 CashShopDatabase::parseBodyNode( const ryml::NodeRef& node ){
}
if( !exists ){
this->put( tab, entry );
this->put( static_cast<uint16>( tab ), entry );
}
return 1;
}
std::shared_ptr<s_cash_item> CashShopDatabase::findItemInTab( e_cash_shop_tab tab, t_itemid nameid ){
std::shared_ptr<s_cash_item_tab> cash_tab = this->find( tab );
std::shared_ptr<s_cash_item_tab> cash_tab = this->find( static_cast<uint16>( tab ) );
if( cash_tab == nullptr ){
return nullptr;

View File

@ -63,7 +63,7 @@ struct s_cash_item_tab{
std::vector<std::shared_ptr<s_cash_item>> items;
};
class CashShopDatabase : public TypesafeYamlDatabase<e_cash_shop_tab, s_cash_item_tab>{
class CashShopDatabase : public TypesafeYamlDatabase<uint16, s_cash_item_tab>{
public:
CashShopDatabase() : TypesafeYamlDatabase( "ITEM_CASH_DB", 1 ){