Revert "Check mItemArray in component-level getter and return correct null value for"
This reverts commit ee90f495946efc95f514639368183c07d6ac3a55.
diff --git a/slang_rs_reflection.cpp b/slang_rs_reflection.cpp
index 635abcf..0aab8c0 100644
--- a/slang_rs_reflection.cpp
+++ b/slang_rs_reflection.cpp
@@ -256,30 +256,6 @@
return "";
}
-static const char *GetTypeNullValue(const RSExportType *ET) {
- switch (ET->getClass()) {
- case RSExportType::ExportClassPrimitive: {
- if (static_cast<const RSExportPrimitiveType*>(ET)->isRSObjectType())
- return "null";
- else
- return "0";
- break;
- }
- case RSExportType::ExportClassPointer:
- case RSExportType::ExportClassVector:
- case RSExportType::ExportClassMatrix:
- case RSExportType::ExportClassConstantArray:
- case RSExportType::ExportClassRecord: {
- return "null";
- break;
- }
- default: {
- assert(false && "Unknown class of type");
- }
- }
- return "";
-}
-
static const char *GetBuiltinElementConstruct(const RSExportType *ET) {
if (ET->getClass() == RSExportType::ExportClassPrimitive) {
const RSExportPrimitiveType *EPT =
@@ -1458,8 +1434,6 @@
1,
"int",
"index");
- C.indent() << "if ("RS_TYPE_ITEM_BUFFER_NAME" == null) return "
- << GetTypeNullValue(F->getType()) << ";" << std::endl;
C.indent() << "return "RS_TYPE_ITEM_BUFFER_NAME"[index]." << F->getName()
<< ";" << std::endl;
C.endFunction();