summaryrefslogtreecommitdiffstats
path: root/macosx/HBCodingUtilities.h
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBCodingUtilities.h')
-rw-r--r--macosx/HBCodingUtilities.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/macosx/HBCodingUtilities.h b/macosx/HBCodingUtilities.h
index 17d188b7f..cc92f9b6e 100644
--- a/macosx/HBCodingUtilities.h
+++ b/macosx/HBCodingUtilities.h
@@ -23,6 +23,9 @@
#define decodeCollectionOfObjects2(x, cl, objectcl, objectcl2) x = [HBCodingUtilities decodeObjectOfClasses:[NSSet setWithObjects:[cl class], [objectcl class], [objectcl2 class], nil] forKey:OBJC_STRINGIFY(x) decoder:decoder];
+#define decodeCollectionOfObjects3(x, cl, objectcl, objectcl2, objectcl3) x = [HBCodingUtilities decodeObjectOfClasses:[NSSet setWithObjects:[cl class], [objectcl class], [objectcl2 class], [objectcl3 class], nil] forKey:OBJC_STRINGIFY(x) decoder:decoder];
+
+
#define decodeObjectOrFail(x, class) x = [HBCodingUtilities decodeObjectOfClass:class forKey:OBJC_STRINGIFY(x) decoder:decoder]; if (x == nil) {NSLog(@"Failed to decode: %@", OBJC_STRINGIFY(x)); goto fail;}
NS_ASSUME_NONNULL_BEGIN