Removing sticky using namespace std.
authordeba
Wed, 06 Apr 2005 17:19:54 +0000
changeset 1311b810a07248a0
parent 1310 1b434e6cc405
child 1312 48f9299b390d
Removing sticky using namespace std.
Making up the using of namespaces.
src/lemon/bits/alteration_notifier.h
src/lemon/graph_reader.h
src/lemon/graph_writer.h
     1.1 --- a/src/lemon/bits/alteration_notifier.h	Wed Apr 06 08:14:16 2005 +0000
     1.2 +++ b/src/lemon/bits/alteration_notifier.h	Wed Apr 06 17:19:54 2005 +0000
     1.3 @@ -24,8 +24,6 @@
     1.4  ///\file
     1.5  ///\brief Observer registry for graph alteration observers.
     1.6  
     1.7 -using namespace std;
     1.8 -
     1.9  namespace lemon {
    1.10  
    1.11    /// \addtogroup graphmaps
     2.1 --- a/src/lemon/graph_reader.h	Wed Apr 06 08:14:16 2005 +0000
     2.2 +++ b/src/lemon/graph_reader.h	Wed Apr 06 17:19:54 2005 +0000
     2.3 @@ -82,7 +82,7 @@
     2.4      void read(std::istream& is, std::string& value) {
     2.5        char c;
     2.6        value.clear();
     2.7 -      is >> ws;
     2.8 +      is >> std::ws;
     2.9        if (!is.get(c) || c != '\"') 
    2.10  	throw DataFormatError("Quoted string format error");
    2.11        while (is.get(c) && c != '\"') {
    2.12 @@ -357,7 +357,7 @@
    2.13      template <typename Item> class InverterBase;
    2.14  
    2.15      std::string readNodeSet(int& line_num, 
    2.16 -			    auto_ptr<InverterBase<Node> > & nodeInverter) {
    2.17 +			    std::auto_ptr<InverterBase<Node> >& nodeInverter) {
    2.18        std::vector<ReaderBase<Node>* > index;
    2.19        {
    2.20  	std::string line = readNotEmptyLine(is, line_num);    
    2.21 @@ -379,7 +379,8 @@
    2.22  	throw DataFormatError("Cannot find node id map");
    2.23        }
    2.24  
    2.25 -      nodeInverter = auto_ptr<InverterBase<Node> >(index[0]->getInverter());
    2.26 +      nodeInverter = 
    2.27 +	std::auto_ptr<InverterBase<Node> >(index[0]->getInverter());
    2.28        std::string line;
    2.29        while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
    2.30  	Node node = graph.addNode();
    2.31 @@ -393,8 +394,8 @@
    2.32      }
    2.33  
    2.34      std::string readEdgeSet(int& line_num, 
    2.35 -			    auto_ptr<InverterBase<Edge> > & edgeInverter, 
    2.36 -			    auto_ptr<InverterBase<Node> > & nodeInverter) {
    2.37 +			    std::auto_ptr<InverterBase<Edge> >& edgeInverter, 
    2.38 +			    std::auto_ptr<InverterBase<Node> >& nodeInverter) {
    2.39        std::vector<ReaderBase<Edge>*> index;
    2.40        {
    2.41  	std::string line = readNotEmptyLine(is, line_num);    
    2.42 @@ -416,7 +417,8 @@
    2.43  	throw DataFormatError("Cannot find edge id map");
    2.44        }
    2.45  
    2.46 -      edgeInverter = auto_ptr<InverterBase<Edge> >(index[0]->getInverter());
    2.47 +      edgeInverter = 
    2.48 +	std::auto_ptr<InverterBase<Edge> >(index[0]->getInverter());
    2.49        std::string line;
    2.50        while (line = readNotEmptyLine(is, line_num), line[0] != '@') {	
    2.51  	std::istringstream ls(line);
    2.52 @@ -432,7 +434,7 @@
    2.53      }
    2.54  
    2.55      std::string readNodes(int& line_num, 
    2.56 -			  auto_ptr<InverterBase<Node> >& nodeInverter) {
    2.57 +			  std::auto_ptr<InverterBase<Node> >& nodeInverter) {
    2.58        std::string line;
    2.59        while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
    2.60  	std::istringstream ls(line);
    2.61 @@ -447,7 +449,7 @@
    2.62      }
    2.63  
    2.64      std::string readEdges(int& line_num, 
    2.65 -			  auto_ptr<InverterBase<Edge> >& edgeInverter) {
    2.66 +			  std::auto_ptr<InverterBase<Edge> >& edgeInverter) {
    2.67        std::string line;
    2.68        while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
    2.69  	std::istringstream ls(line);
    2.70 @@ -465,7 +467,7 @@
    2.71        std::string line;
    2.72        while (++line_num, getline(is, line)) {	
    2.73  	int vi = line.find_first_not_of(" \t");
    2.74 -	if (vi != (int)string::npos && line[vi] != '#') {
    2.75 +	if (vi != (int)std::string::npos && line[vi] != '#') {
    2.76  	  return line.substr(vi);
    2.77  	}
    2.78        }
    2.79 @@ -507,7 +509,7 @@
    2.80  	map.set(item, value);
    2.81  	typename Inverse::iterator it = inverse.find(value);
    2.82  	if (it == inverse.end()) {
    2.83 -	  inverse.insert(make_pair(value, item));
    2.84 +	  inverse.insert(std::make_pair(value, item));
    2.85  	} else {
    2.86  	  throw DataFormatError("Multiple ID occurence");
    2.87  	}
    2.88 @@ -545,7 +547,7 @@
    2.89  	reader.read(is, value);
    2.90  	typename Inverse::iterator it = inverse.find(value);
    2.91  	if (it == inverse.end()) {
    2.92 -	  inverse.insert(make_pair(value, item));
    2.93 +	  inverse.insert(std::make_pair(value, item));
    2.94  	} else {
    2.95  	  throw DataFormatError("Multiple ID occurence error");
    2.96  	}
     3.1 --- a/src/lemon/graph_writer.h	Wed Apr 06 08:14:16 2005 +0000
     3.2 +++ b/src/lemon/graph_writer.h	Wed Apr 06 17:19:54 2005 +0000
     3.3 @@ -82,7 +82,7 @@
     3.4      void write(std::ostream& os, const std::string& value) {
     3.5        os << "\"";
     3.6        if (escaped) {
     3.7 -	ostringstream ls;
     3.8 +	std::ostringstream ls;
     3.9  	for (int i = 0; i < (int)value.size(); ++i) {
    3.10  	  writeEscape(ls, value[i]);
    3.11  	}
    3.12 @@ -132,7 +132,7 @@
    3.13  	return;
    3.14        default:
    3.15  	if (c < 0x20) {
    3.16 -	  os << '\\' << oct << (int)c;
    3.17 +	  os << '\\' << std::oct << (int)c;
    3.18  	} else {
    3.19  	  os << c;
    3.20  	}