# HG changeset patch # User deba # Date 1113327291 0 # Node ID a81f9cfc977589010a215cf96d3c731af354764e # Parent e335eebdae5b897ed45be36c4f4e761e01473a0a Some bug fixes. diff -r e335eebdae5b -r a81f9cfc9775 src/lemon/graph_reader.h --- a/src/lemon/graph_reader.h Tue Apr 12 17:33:41 2005 +0000 +++ b/src/lemon/graph_reader.h Tue Apr 12 17:34:51 2005 +0000 @@ -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); } } diff -r e335eebdae5b -r a81f9cfc9775 src/lemon/graph_writer.h --- a/src/lemon/graph_writer.h Tue Apr 12 17:33:41 2005 +0000 +++ b/src/lemon/graph_writer.h Tue Apr 12 17:34:51 2005 +0000 @@ -382,6 +382,7 @@ void writeEdgeSet(WriterBase* nodeWriter, WriterBase* & 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* nodeWriter) { + if (node_writers.size() == 0) return; if (nodeWriter == 0) { throw DataFormatError("Cannot find node id map"); } @@ -418,6 +420,7 @@ } void writeEdges(WriterBase* edgeWriter) { + if (edge_writers.size() == 0) return; if (edgeWriter == 0) { throw DataFormatError("Cannot find node id map"); }