Fix enum type arithmetic deprecation warnings

master
Beq 2025-11-17 16:01:28 +00:00
parent 2dfaf4c7b1
commit 3bd1202dbe
2 changed files with 14 additions and 3 deletions

View File

@ -1131,7 +1131,13 @@ bool LLDAELoader::OpenFile(const std::string& filename)
LLModel* mdl = *i;
if(mdl->getStatus() != LLModel::NO_ERRORS)
{
setLoadState(ERROR_MODEL + mdl->getStatus()) ;
// <FS:Beq> Fix deprecated arithmetic between different enum types (ERROR_MODEL + EModelStatus)
// Ugly fix. could use a helper instead but its only called in two places.
// setLoadState(ERROR_MODEL + mdl->getStatus());
setLoadState(
static_cast<LLModelLoader::eLoadState>(
static_cast<S32>(ERROR_MODEL) + static_cast<S32>(mdl->getStatus())));
// </FS:Beq>
return false; //abort
}

View File

@ -486,8 +486,13 @@ void LLGLTFLoader::processNodeHierarchy(S32 node_idx, std::map<std::string, S32>
}
else
{
setLoadState(ERROR_MODEL + pModel->getStatus());
delete pModel;
// <FS:Beq> Fix deprecated arithmetic between different enum types (ERROR_MODEL + EModelStatus)
// Ugly fix. could use a helper instead but its only called in two places.
// setLoadState(ERROR_MODEL + pModel->getStatus());
setLoadState(
static_cast<LLModelLoader::eLoadState>(
static_cast<S32>(ERROR_MODEL) + static_cast<S32>(mdl->getStatus())));
// </FS:Beq> delete pModel;
return;
}
}