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; return false;
} }
reader = ContentTypeReaderActivador::CreateInstance(type, err); reader = ContentTypeReaderActivador::CreateInstance(type);
return true; return true;
} }

View File

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