From 542563feaf128365dbf80ce438e7a275c8948500 Mon Sep 17 00:00:00 2001 From: marauder2k7 Date: Thu, 19 Jun 2025 17:32:09 +0100 Subject: [PATCH] Update ShapeAsset.h fix linux and mac being pedantic about NULL = 0 --- Engine/source/T3D/assets/ShapeAsset.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Engine/source/T3D/assets/ShapeAsset.h b/Engine/source/T3D/assets/ShapeAsset.h index 2086c0395..8a3d37ba5 100644 --- a/Engine/source/T3D/assets/ShapeAsset.h +++ b/Engine/source/T3D/assets/ShapeAsset.h @@ -554,7 +554,7 @@ public: }; \ \ inline StringTableEntry _get##name##AssetId(void) const { return m##name##Asset.getAssetId(); } \ - Resource get##name() { if (m##name##Asset.notNull()) return m##name##Asset->getShapeResource(); else return NULL; } \ + Resource get##name() { if (m##name##Asset.notNull()) return m##name##Asset->getShapeResource(); else return ResourceManager::get().load( "" ); } \ AssetPtr get##name##Asset(void) { return m##name##Asset; } \ static bool _set##name##Data(void* obj, const char* index, const char* data) { static_cast(obj)->_set##name(_getStringTable()->insert(data)); return false; } \ StringTableEntry get##name##File() { return m##name##Asset.notNull() ? m##name##Asset->getShapePath() : ""; } @@ -612,7 +612,7 @@ public: }; \ \ inline StringTableEntry _get##name##AssetId(void) const { return m##name##Asset.getAssetId(); } \ - Resource get##name() { if (m##name##Asset.notNull()) return m##name##Asset->getShapeResource(); else return NULL; } \ + Resource get##name() { if (m##name##Asset.notNull()) return m##name##Asset->getShapeResource(); else return ResourceManager::get().load( "" ); } \ AssetPtr get##name##Asset(void) { return m##name##Asset; } \ static bool _set##name##Data(void* obj, const char* index, const char* data) { static_cast(obj)->_set##name(_getStringTable()->insert(data)); return false; } \ StringTableEntry get##name##File() { return m##name##Asset.notNull() ? m##name##Asset->getShapePath() : ""; } @@ -673,7 +673,7 @@ public: }; \ \ inline StringTableEntry _get##name##AssetId(const U32& index) const { return m##name##Asset[index].getAssetId(); } \ - Resource get##name(const U32& index) { if (m##name##Asset[index].notNull()) return m##name##Asset[index]->getShapeResource(); else return NULL; } \ + Resource get##name(const U32& index) { if (m##name##Asset[index].notNull()) return m##name##Asset[index]->getShapeResource(); else return ResourceManager::get().load( "" ); } \ AssetPtr get##name##Asset(const U32& index) { return m##name##Asset[index]; } \ static bool _set##name##Data(void* obj, const char* index, const char* data) { static_cast(obj)->_set##name(_getStringTable()->insert(data), dAtoi(index)); return false;}\ StringTableEntry get##name##File(const U32& idx) { return m##name##Asset[idx].notNull() ? m##name##Asset[idx]->getShapePath() : ""; } @@ -731,7 +731,7 @@ public: }; \ \ inline StringTableEntry _get##name##AssetId(const U32& index) const { return m##name##Asset[index].getAssetId(); } \ - Resource get##name(const U32& index) { if (m##name##Asset[index].notNull()) return m##name##Asset[index]->getShapeResource(); else return NULL; } \ + Resource get##name(const U32& index) { if (m##name##Asset[index].notNull()) return m##name##Asset[index]->getShapeResource(); else return ResourceManager::get().load( "" ); } \ AssetPtr get##name##Asset(const U32& index) { return m##name##Asset[index]; } \ static bool _set##name##Data(void* obj, const char* index, const char* data) { static_cast(obj)->_set##name(_getStringTable()->insert(data), dAtoi(index)); return false;}\ StringTableEntry get##name##File(const U32& idx) { return m##name##Asset[idx].notNull() ? m##name##Asset[idx]->getShapePath() : ""; }