X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=alien.cc;h=49d19fe5c9b06829bdc8deac3a688890da957b78;hb=9199c6da801c1555dadb23b230b400e3f1364abc;hp=7a225b71932e33b20e570e04de81712f12849623;hpb=121a58d72f3b5e537007072f93397f6e6661fb90;p=odcread.git diff --git a/alien.cc b/alien.cc index 7a225b7..49d19fe 100644 --- a/alien.cc +++ b/alien.cc @@ -11,17 +11,20 @@ std::string AlienPiece::toString() { AlienPart::AlienPart(Store * const _store): store(_store) {} std::string AlienPart::toString() { - return store->toString(); + if (store != 0) + return store->toString(); + else + return "NULL"; } -Alien::Alien(INTEGER id, SHORTCHAR **path): Store(id), d_path(path), d_comps() {} +Alien::Alien(INTEGER id, const TypePath &path): Store(id), d_path(path), d_comps() {} std::vector & Alien::getComponents() { return d_comps; } std::string Alien::toString() { - std::string sofar = std::string(d_path[0]) + "{ "; + std::string sofar = d_path.toString() + "{ "; for (int i = 0; i < d_comps.size(); ++i) { sofar += d_comps[i]->toString() + " "; }