| … | … | @@ -52,12 +52,12 @@ StorageNode::~StorageNode() |
| 52 | 52 | |
| 53 | 53 | AtomSpace* StorageNode::get_target_as(const ValuePtr& value) const |
| 54 | 54 | { |
| 55 | | if (value->is_type(ATOM_SPACE)) |
| 56 | | return AtomSpaceCast(value).get(); |
| 57 | | |
| 58 | 55 | if (nullptr == value or 0 == value->size()) |
| 59 | 56 | return _target_as.get(); |
| 60 | 57 | |
| 58 | if (value->is_type(ATOM_SPACE)) |
| 59 | return AtomSpaceCast(value).get(); |
| 60 | |
| 61 | 61 | ValuePtr vp(value); |
| 62 | 62 | if (vp->is_type(ATOM)) |
| 63 | 63 | { |
| … | … | @@ -66,12 +66,12 @@ AtomSpace* StorageNode::get_target_as(const ValuePtr& value) const |
| 66 | 66 | vp = h->execute(); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | | if (vp->is_type(ATOM_SPACE)) |
| 70 | | return AtomSpaceCast(vp).get(); |
| 71 | | |
| 72 | 69 | if (nullptr == vp or 0 == vp->size()) |
| 73 | 70 | return _target_as.get(); |
| 74 | 71 | |
| 72 | if (vp->is_type(ATOM_SPACE)) |
| 73 | return AtomSpaceCast(vp).get(); |
| 74 | |
| 75 | 75 | throw RuntimeException(TRACE_INFO, |
| 76 | 76 | "Expected AtomSpace; got %s", value->to_string().c_str()); |
| 77 | 77 | } |