1.1 --- a/src/lemon/graph_reader.h Wed Apr 06 08:14:16 2005 +0000
1.2 +++ b/src/lemon/graph_reader.h Wed Apr 06 17:19:54 2005 +0000
1.3 @@ -82,7 +82,7 @@
1.4 void read(std::istream& is, std::string& value) {
1.5 char c;
1.6 value.clear();
1.7 - is >> ws;
1.8 + is >> std::ws;
1.9 if (!is.get(c) || c != '\"')
1.10 throw DataFormatError("Quoted string format error");
1.11 while (is.get(c) && c != '\"') {
1.12 @@ -357,7 +357,7 @@
1.13 template <typename Item> class InverterBase;
1.14
1.15 std::string readNodeSet(int& line_num,
1.16 - auto_ptr<InverterBase<Node> > & nodeInverter) {
1.17 + std::auto_ptr<InverterBase<Node> >& nodeInverter) {
1.18 std::vector<ReaderBase<Node>* > index;
1.19 {
1.20 std::string line = readNotEmptyLine(is, line_num);
1.21 @@ -379,7 +379,8 @@
1.22 throw DataFormatError("Cannot find node id map");
1.23 }
1.24
1.25 - nodeInverter = auto_ptr<InverterBase<Node> >(index[0]->getInverter());
1.26 + nodeInverter =
1.27 + std::auto_ptr<InverterBase<Node> >(index[0]->getInverter());
1.28 std::string line;
1.29 while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
1.30 Node node = graph.addNode();
1.31 @@ -393,8 +394,8 @@
1.32 }
1.33
1.34 std::string readEdgeSet(int& line_num,
1.35 - auto_ptr<InverterBase<Edge> > & edgeInverter,
1.36 - auto_ptr<InverterBase<Node> > & nodeInverter) {
1.37 + std::auto_ptr<InverterBase<Edge> >& edgeInverter,
1.38 + std::auto_ptr<InverterBase<Node> >& nodeInverter) {
1.39 std::vector<ReaderBase<Edge>*> index;
1.40 {
1.41 std::string line = readNotEmptyLine(is, line_num);
1.42 @@ -416,7 +417,8 @@
1.43 throw DataFormatError("Cannot find edge id map");
1.44 }
1.45
1.46 - edgeInverter = auto_ptr<InverterBase<Edge> >(index[0]->getInverter());
1.47 + edgeInverter =
1.48 + std::auto_ptr<InverterBase<Edge> >(index[0]->getInverter());
1.49 std::string line;
1.50 while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
1.51 std::istringstream ls(line);
1.52 @@ -432,7 +434,7 @@
1.53 }
1.54
1.55 std::string readNodes(int& line_num,
1.56 - auto_ptr<InverterBase<Node> >& nodeInverter) {
1.57 + std::auto_ptr<InverterBase<Node> >& nodeInverter) {
1.58 std::string line;
1.59 while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
1.60 std::istringstream ls(line);
1.61 @@ -447,7 +449,7 @@
1.62 }
1.63
1.64 std::string readEdges(int& line_num,
1.65 - auto_ptr<InverterBase<Edge> >& edgeInverter) {
1.66 + std::auto_ptr<InverterBase<Edge> >& edgeInverter) {
1.67 std::string line;
1.68 while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
1.69 std::istringstream ls(line);
1.70 @@ -465,7 +467,7 @@
1.71 std::string line;
1.72 while (++line_num, getline(is, line)) {
1.73 int vi = line.find_first_not_of(" \t");
1.74 - if (vi != (int)string::npos && line[vi] != '#') {
1.75 + if (vi != (int)std::string::npos && line[vi] != '#') {
1.76 return line.substr(vi);
1.77 }
1.78 }
1.79 @@ -507,7 +509,7 @@
1.80 map.set(item, value);
1.81 typename Inverse::iterator it = inverse.find(value);
1.82 if (it == inverse.end()) {
1.83 - inverse.insert(make_pair(value, item));
1.84 + inverse.insert(std::make_pair(value, item));
1.85 } else {
1.86 throw DataFormatError("Multiple ID occurence");
1.87 }
1.88 @@ -545,7 +547,7 @@
1.89 reader.read(is, value);
1.90 typename Inverse::iterator it = inverse.find(value);
1.91 if (it == inverse.end()) {
1.92 - inverse.insert(make_pair(value, item));
1.93 + inverse.insert(std::make_pair(value, item));
1.94 } else {
1.95 throw DataFormatError("Multiple ID occurence error");
1.96 }