[Lemon-commits] [lemon_svn] deba: r1782 - hugo/trunk/src/lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:47:36 CET 2006


Author: deba
Date: Tue Apr 12 19:34:51 2005
New Revision: 1782

Modified:
   hugo/trunk/src/lemon/graph_reader.h
   hugo/trunk/src/lemon/graph_writer.h

Log:
Some bug fixes.



Modified: hugo/trunk/src/lemon/graph_reader.h
==============================================================================
--- hugo/trunk/src/lemon/graph_reader.h	(original)
+++ hugo/trunk/src/lemon/graph_reader.h	Tue Apr 12 19:34:51 2005
@@ -553,7 +553,6 @@
 	}
 	vi = line.find_first_not_of(" \t");
 	if (vi != (int)std::string::npos) { 
-	  //	  std::cerr << "Line: " << line.substr(vi) << std::endl;
 	  return line.substr(vi);
 	}
       }

Modified: hugo/trunk/src/lemon/graph_writer.h
==============================================================================
--- hugo/trunk/src/lemon/graph_writer.h	(original)
+++ hugo/trunk/src/lemon/graph_writer.h	Tue Apr 12 19:34:51 2005
@@ -382,6 +382,7 @@
 
     void writeEdgeSet(WriterBase<Node>* nodeWriter, 
 		      WriterBase<Edge>* & edgeWriter) {
+      if (edge_map_writers.size() == 0) return;
       if (nodeWriter == 0) {
 	throw DataFormatError("Cannot find node id map");
       }
@@ -406,6 +407,7 @@
     }
 
     void writeNodes(WriterBase<Node>* nodeWriter) {
+      if (node_writers.size() == 0) return;
       if (nodeWriter == 0) {
 	throw DataFormatError("Cannot find node id map");
       }
@@ -418,6 +420,7 @@
     }
 
     void writeEdges(WriterBase<Edge>* edgeWriter) {
+      if (edge_writers.size() == 0) return;
       if (edgeWriter == 0) {
 	throw DataFormatError("Cannot find node id map");
       }



More information about the Lemon-commits mailing list