Fix enum type arithmetic deprecation warnings
parent
2dfaf4c7b1
commit
3bd1202dbe
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue