enable nullable propeties without a macro

This commit is contained in:
Ari Lazier 2015-10-27 09:51:06 -07:00
parent ccdfaa8ae9
commit dca7e7d791
2 changed files with 0 additions and 8 deletions

View File

@ -555,11 +555,7 @@ InvalidNullabilityException::InvalidNullabilityException(std::string const& obje
m_what = "'Object' property '" + property.name + "' must be nullable."; m_what = "'Object' property '" + property.name + "' must be nullable.";
} }
else { else {
#if REALM_NULL_STRINGS == 1
m_what = "Array or Mixed property '" + property.name + "' cannot be nullable"; m_what = "Array or Mixed property '" + property.name + "' cannot be nullable";
#else
m_what = "Only 'Object' property types are nullable";
#endif
} }
} }

View File

@ -71,11 +71,7 @@ void Schema::validate() const
// check nullablity // check nullablity
if (prop.is_nullable) { if (prop.is_nullable) {
#if REALM_NULL_STRINGS == 1
if (prop.type == PropertyTypeArray || prop.type == PropertyTypeAny) { if (prop.type == PropertyTypeArray || prop.type == PropertyTypeAny) {
#else
if (prop.type != PropertyTypeObject) {
#endif
exceptions.emplace_back(InvalidNullabilityException(object.name, prop)); exceptions.emplace_back(InvalidNullabilityException(object.name, prop));
} }
} }