1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00

Remove XnaErrorCode de ContentTypeReaderActivador

This commit is contained in:
Danilo 2024-06-03 16:16:27 -03:00
parent 952511890b
commit 00cb0b62bd
2 changed files with 5 additions and 7 deletions

View File

@ -103,7 +103,7 @@ namespace xna {
return false;
}
reader = ContentTypeReaderActivador::CreateInstance(type, err);
reader = ContentTypeReaderActivador::CreateInstance(type);
return true;
}

View File

@ -72,11 +72,10 @@ namespace xna {
public:
using Activador = sptr<ContentTypeReader>(*)();
static sptr<ContentTypeReader> CreateInstance(sptr<Type> const& type, xna_error_nullarg) {
static sptr<ContentTypeReader> CreateInstance(sptr<Type> const& type) {
if (!type)
{
xna_error_apply(err, XnaErrorCode::ARGUMENT_IS_NULL);
return nullptr;
throw std::invalid_argument("ContentTypeReaderActivador: type is null.");
}
const auto hash = type->GetHashCode();
@ -91,10 +90,9 @@ namespace xna {
return activador();
}
static void SetActivador(sptr<Type> const& type, Activador activador, xna_error_nullarg) {
static void SetActivador(sptr<Type> const& type, Activador activador) {
if (!type) {
xna_error_apply(err, XnaErrorCode::ARGUMENT_IS_NULL);
return;
throw std::invalid_argument("ContentTypeReaderActivador: type is null.");
}
const auto hash = type->GetHashCode();