mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 06:27:45 +00:00
Merge pull request #590 from NotAdam/develop
fix clang builds & exd_struct_gen error handling
This commit is contained in:
commit
7942f22252
2 changed files with 12 additions and 3 deletions
|
@ -127,8 +127,17 @@ std::string generateStruct( const std::string& exd )
|
||||||
}
|
}
|
||||||
|
|
||||||
auto sheet = nlohmann::json();
|
auto sheet = nlohmann::json();
|
||||||
std::ifstream defJson( path );
|
|
||||||
defJson >> sheet;
|
try
|
||||||
|
{
|
||||||
|
std::ifstream defJson( path );
|
||||||
|
defJson >> sheet;
|
||||||
|
}
|
||||||
|
catch( const std::exception& ex )
|
||||||
|
{
|
||||||
|
Logger::error( "Failed parsing json definition, err: {} file: {}", ex.what(), path );
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
for( auto& definition : sheet[ "definitions" ] )
|
for( auto& definition : sheet[ "definitions" ] )
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
namespace Sapphire::World::Territory::Housing
|
namespace Sapphire::World::Territory::Housing
|
||||||
{
|
{
|
||||||
class HousingInteriorTerritory : public Territory
|
class HousingInteriorTerritory : public Sapphire::Territory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HousingInteriorTerritory( Common::LandIdent ident, uint16_t territoryTypeId,
|
HousingInteriorTerritory( Common::LandIdent ident, uint16_t territoryTypeId,
|
||||||
|
|
Loading…
Add table
Reference in a new issue