From dca7e7d7919683f2f0e14ffa1b8f124fa8ad1c14 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Tue, 27 Oct 2015 09:51:06 -0700 Subject: [PATCH] enable nullable propeties without a macro --- object_store.cpp | 4 ---- schema.cpp | 4 ---- 2 files changed, 8 deletions(-) diff --git a/object_store.cpp b/object_store.cpp index c282e20b..1949c285 100644 --- a/object_store.cpp +++ b/object_store.cpp @@ -555,11 +555,7 @@ InvalidNullabilityException::InvalidNullabilityException(std::string const& obje m_what = "'Object' property '" + property.name + "' must be nullable."; } else { -#if REALM_NULL_STRINGS == 1 m_what = "Array or Mixed property '" + property.name + "' cannot be nullable"; -#else - m_what = "Only 'Object' property types are nullable"; -#endif } } diff --git a/schema.cpp b/schema.cpp index bf7a6181..911dc4e5 100644 --- a/schema.cpp +++ b/schema.cpp @@ -71,11 +71,7 @@ void Schema::validate() const // check nullablity if (prop.is_nullable) { -#if REALM_NULL_STRINGS == 1 if (prop.type == PropertyTypeArray || prop.type == PropertyTypeAny) { -#else - if (prop.type != PropertyTypeObject) { -#endif exceptions.emplace_back(InvalidNullabilityException(object.name, prop)); } }