# HG changeset patch # User deba # Date 1112807994 0 # Node ID b810a07248a00a6a8b41d7ea3306542672807d67 # Parent 1b434e6cc40572b26c2552c7d77049ca44914bba Removing sticky using namespace std. Making up the using of namespaces. diff -r 1b434e6cc405 -r b810a07248a0 src/lemon/bits/alteration_notifier.h --- a/src/lemon/bits/alteration_notifier.h Wed Apr 06 08:14:16 2005 +0000 +++ b/src/lemon/bits/alteration_notifier.h Wed Apr 06 17:19:54 2005 +0000 @@ -24,8 +24,6 @@ ///\file ///\brief Observer registry for graph alteration observers. -using namespace std; - namespace lemon { /// \addtogroup graphmaps diff -r 1b434e6cc405 -r b810a07248a0 src/lemon/graph_reader.h --- a/src/lemon/graph_reader.h Wed Apr 06 08:14:16 2005 +0000 +++ b/src/lemon/graph_reader.h Wed Apr 06 17:19:54 2005 +0000 @@ -82,7 +82,7 @@ void read(std::istream& is, std::string& value) { char c; value.clear(); - is >> ws; + is >> std::ws; if (!is.get(c) || c != '\"') throw DataFormatError("Quoted string format error"); while (is.get(c) && c != '\"') { @@ -357,7 +357,7 @@ template class InverterBase; std::string readNodeSet(int& line_num, - auto_ptr > & nodeInverter) { + std::auto_ptr >& nodeInverter) { std::vector* > index; { std::string line = readNotEmptyLine(is, line_num); @@ -379,7 +379,8 @@ throw DataFormatError("Cannot find node id map"); } - nodeInverter = auto_ptr >(index[0]->getInverter()); + nodeInverter = + std::auto_ptr >(index[0]->getInverter()); std::string line; while (line = readNotEmptyLine(is, line_num), line[0] != '@') { Node node = graph.addNode(); @@ -393,8 +394,8 @@ } std::string readEdgeSet(int& line_num, - auto_ptr > & edgeInverter, - auto_ptr > & nodeInverter) { + std::auto_ptr >& edgeInverter, + std::auto_ptr >& nodeInverter) { std::vector*> index; { std::string line = readNotEmptyLine(is, line_num); @@ -416,7 +417,8 @@ throw DataFormatError("Cannot find edge id map"); } - edgeInverter = auto_ptr >(index[0]->getInverter()); + edgeInverter = + std::auto_ptr >(index[0]->getInverter()); std::string line; while (line = readNotEmptyLine(is, line_num), line[0] != '@') { std::istringstream ls(line); @@ -432,7 +434,7 @@ } std::string readNodes(int& line_num, - auto_ptr >& nodeInverter) { + std::auto_ptr >& nodeInverter) { std::string line; while (line = readNotEmptyLine(is, line_num), line[0] != '@') { std::istringstream ls(line); @@ -447,7 +449,7 @@ } std::string readEdges(int& line_num, - auto_ptr >& edgeInverter) { + std::auto_ptr >& edgeInverter) { std::string line; while (line = readNotEmptyLine(is, line_num), line[0] != '@') { std::istringstream ls(line); @@ -465,7 +467,7 @@ std::string line; while (++line_num, getline(is, line)) { int vi = line.find_first_not_of(" \t"); - if (vi != (int)string::npos && line[vi] != '#') { + if (vi != (int)std::string::npos && line[vi] != '#') { return line.substr(vi); } } @@ -507,7 +509,7 @@ map.set(item, value); typename Inverse::iterator it = inverse.find(value); if (it == inverse.end()) { - inverse.insert(make_pair(value, item)); + inverse.insert(std::make_pair(value, item)); } else { throw DataFormatError("Multiple ID occurence"); } @@ -545,7 +547,7 @@ reader.read(is, value); typename Inverse::iterator it = inverse.find(value); if (it == inverse.end()) { - inverse.insert(make_pair(value, item)); + inverse.insert(std::make_pair(value, item)); } else { throw DataFormatError("Multiple ID occurence error"); } diff -r 1b434e6cc405 -r b810a07248a0 src/lemon/graph_writer.h --- a/src/lemon/graph_writer.h Wed Apr 06 08:14:16 2005 +0000 +++ b/src/lemon/graph_writer.h Wed Apr 06 17:19:54 2005 +0000 @@ -82,7 +82,7 @@ void write(std::ostream& os, const std::string& value) { os << "\""; if (escaped) { - ostringstream ls; + std::ostringstream ls; for (int i = 0; i < (int)value.size(); ++i) { writeEscape(ls, value[i]); } @@ -132,7 +132,7 @@ return; default: if (c < 0x20) { - os << '\\' << oct << (int)c; + os << '\\' << std::oct << (int)c; } else { os << c; }