From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/core/zone.cc | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/core/zone.cc') diff --git a/src/core/zone.cc b/src/core/zone.cc index 3567090..ac3bc4d 100644 --- a/src/core/zone.cc +++ b/src/core/zone.cc @@ -58,13 +58,13 @@ Zone *Zone::find(std::string const & name) Zone *Zone::search(std::string const & searchname) { - std::string strsearchkey(aux::lowercase(searchname)); + std::string strsearchkey(aux::lowercase(searchname)); std::stringstream str(strsearchkey); unsigned int id; if (str >> id) return find(id); - + if (strsearchkey.size() < 3) { return 0; } @@ -79,7 +79,7 @@ Zone *Zone::search(std::string const & searchname) if (label.size() && (label.find(strsearchkey) != std::string::npos)) { return zone; } - + name.assign(aux::lowercase(zone->name())); if (name.size() && (name.find(strsearchkey) != std::string::npos)) { return zone; @@ -101,7 +101,7 @@ void Zone::list() void Zone ::clear() { for (Registry::iterator it = zone_registry.begin(); it != zone_registry.end(); it++) { - delete (*it).second; + delete(*it).second; } zone_registry.clear(); @@ -109,7 +109,7 @@ void Zone ::clear() /* ---- class Zone ------------------------------------------------- */ Zone::Zone(std::string const & label) : - zone_label(label) + zone_label(label) { zone_id = 0; zone_name.clear(); @@ -139,10 +139,10 @@ void Zone::print() for (Content::iterator it = zone_content.begin(); it != zone_content.end(); it++) { Entity *entity = (*it); con_print << " id " << std::setw(4) << entity->id() - << " type " << std::setw(4) << entity->type() - << ":" << std::setw(4) << entity->moduletype() - << " " << std::setw(24) << entity->label() - << " ^B" << entity->name() << "^N" << std::endl; + << " type " << std::setw(4) << entity->type() + << ":" << std::setw(4) << entity->moduletype() + << " " << std::setw(24) << entity->label() + << " ^B" << entity->name() << "^N" << std::endl; } con_print << zone_content.size() << " registered zone entities" << std::endl; } @@ -197,7 +197,7 @@ Entity *Zone::find_entity(const std::string & label) Entity *Zone::search_entity(const std::string & searchname) { - std::string strsearchkey(aux::lowercase(searchname)); + std::string strsearchkey(aux::lowercase(searchname)); std::stringstream str(strsearchkey); unsigned int id; @@ -218,7 +218,7 @@ Entity *Zone::search_entity(const std::string & searchname) if (label.size() && (label.find(strsearchkey) != std::string::npos)) { return entity; } - + name.assign(aux::lowercase(entity->name())); if (name.size() && (name.find(strsearchkey) != std::string::npos)) { return entity; @@ -233,27 +233,27 @@ void Zone::serialize_server_update(std::ostream & os) const os << zone_label << " "; os << "\"" << zone_name << "\" "; os << "\"" << zone_sky << "\" "; - os << (zone_defaultview ? zone_defaultview->id() : 0 ); + os << (zone_defaultview ? zone_defaultview->id() : 0); } void Zone::receive_server_update(std::istream &is) { is >> zone_label; - + std::string n; unsigned int id = 0; char c; - while ( (is.get(c)) && (c != '"')); - while ( (is.get(c)) && (c != '"')) - n += c; + while ((is.get(c)) && (c != '"')); + while ((is.get(c)) && (c != '"')) + n += c; zone_name.assign(n); n.clear(); - while ( (is.get(c)) && (c != '"')); - while ( (is.get(c)) && (c != '"')) - n += c; + while ((is.get(c)) && (c != '"')); + while ((is.get(c)) && (c != '"')) + n += c; zone_sky.assign(n); n.clear(); -- cgit v1.2.3