# HG changeset patch # User Jacob Carlborg # Date 1281799482 -7200 # Node ID 8ab9588b92bf8954a3662063cf72f54a121b67cc # Parent 3d42ea434d469045e1d86ef127db758571ba27e5 getValueOfAtrribute has no return at end of method. Fixes #5. diff -r 3d42ea434d46 -r 8ab9588b92bf orange/serialization/archives/XMLArchive.d --- a/orange/serialization/archives/XMLArchive.d Thu Aug 12 23:24:51 2010 +0200 +++ b/orange/serialization/archives/XMLArchive.d Sat Aug 14 17:24:42 2010 +0200 @@ -360,8 +360,15 @@ lastElement = tmp; auto runtimeType = getValueOfAttribute(Attributes.runtimeTypeAttribute); + + if (!runtimeType) + return T.init; + auto name = fromDataType!(string)(runtimeType); id = getValueOfAttribute(Attributes.idAttribute); + + if (!id) + return T.init; T result; @@ -410,6 +417,10 @@ lastElement = element; auto length = getValueOfAttribute(Attributes.lengthAttribute); + + if (!length) + return T.init; + value.length = fromDataType!(size_t)(length); return value; @@ -442,6 +453,9 @@ lastElement = element; id = getValueOfAttribute(Attributes.idAttribute); + + if (!id) + return T.init; T result = new BaseTypeOfPointer!(T); @@ -570,7 +584,9 @@ else errorCallback(new ArchiveException(`Could not unarchive the value of the attribute "` ~ to!(string)(attribute) ~ `" due to malformed data.`, __FILE__, __LINE__), [attribute]); } - } + } + + return null; } private void addArchivedReference (T) (T value, DataType id)