Skip to content

Commit 72e3533

Browse files
committed
clean up the GetProperty_NO_SIGNATURE() logic a bit
1 parent 24bd765 commit 72e3533

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

eidos/eidos_value.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,11 +2176,10 @@ EidosValue_SP EidosValue_Object::GetPropertyOfElements(EidosGlobalStringID p_pro
21762176
// goes through a special vectorized method, not through GetProperty()!
21772177
if (!signature)
21782178
{
2179+
// Note that in this NO_SIGNATURE code path we don't check for a zero-length target and return a zero-length
2180+
// result; since we have no signature, we have no way to know what type that result should be. The class
2181+
// implementation of GetProperty_NO_SIGNATURE() will handle the zero-length case.
21792182
const EidosClass *target_class = class_;
2180-
2181-
if (values_size == 0)
2182-
EIDOS_TERMINATION << "ERROR (EidosValue_Object::GetPropertyOfElements): property " << EidosStringRegistry::StringForGlobalStringID(p_property_id) << " does not specify an unambiguous value type, and thus cannot be accessed on a zero-length vector." << EidosTerminate(nullptr);
2183-
21842183
EidosValue_SP result = target_class->GetProperty_NO_SIGNATURE(p_property_id, values_, values_size);
21852184

21862185
// Access of singleton properties retains the matrix/array structure of the target

0 commit comments

Comments
 (0)