1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Remove unused ToString

This commit is contained in:
Brian Fiete 2021-10-24 13:41:33 -07:00
parent 14794e5574
commit 20af4e2adc
3 changed files with 3 additions and 30 deletions

View file

@ -84,7 +84,7 @@ namespace bf
void*(*Alloc)(intptr size);
void(*Free)(void* ptr);
void(*Object_Delete)(bf::System::Object* obj);
void(*Object_ToString)(bf::System::Object* obj, bf::System::String* str);
void* mUnused0;
bf::System::Type* (*Object_GetType)(bf::System::Object* obj);
void(*Object_GCMarkMembers)(bf::System::Object* obj);
bf::System::Object* (*Object_DynamicCastToTypeId)(bf::System::Object* obj, int typeId);

View file

@ -84,8 +84,7 @@ namespace bf
BFRT_EXPORT static Object* UnsafeCastToObject(void* inPtr);
BFRT_EXPORT static void* UnsafeCastToPtr(Object* obj);
BFRT_EXPORT static void ObjectDynCheck(Object* object, int typeId, bool allowNull);
BFRT_EXPORT static void ObjectDynCheckFailed(Object* object, int typeId);
BFRT_EXPORT static void Throw(Exception* ex);
BFRT_EXPORT static void ObjectDynCheckFailed(Object* object, int typeId);
BFRT_EXPORT static void ThrowIndexOutOfRange(intptr stackOffset);
BFRT_EXPORT static void FatalError(String* error, intptr stackOffset = 0);
BFRT_EXPORT static void MemCpy(void* dest, void* src, intptr length);
@ -395,24 +394,6 @@ void* Internal::UnsafeCastToPtr(Object* obj)
return (void*)obj;
}
void Internal::Throw(Exception* ex)
{
bf::System::String* exStr = gBfRtCallbacks.String_Alloc();
gBfRtCallbacks.Object_ToString(ex, exStr);
Beefy::String errorStr = StrFormat("FATAL: %s", exStr->CStr());
SETUP_ERROR(errorStr.c_str(), 1);
BF_DEBUG_BREAK();
gBfRtCallbacks.DebugMessageData_Fatal();
printf("Thrown: %s", errorStr.c_str());
//TODO: What about capturing callstack?
exit(3);
//throw ex;
}
void Internal::ThrowIndexOutOfRange(intptr stackOffset)
{
if ((stackOffset != -1) && (::IsDebuggerPresent()))