May it does not throw Warning with g++-4.0
authordeba
Mon, 04 Jul 2005 17:51:07 +0000
changeset 15398f589de42c76
parent 1538 777834118f73
child 1540 7d028a73d7f2
May it does not throw Warning with g++-4.0
lemon/graph_to_eps.h
     1.1 --- a/lemon/graph_to_eps.h	Mon Jul 04 17:22:03 2005 +0000
     1.2 +++ b/lemon/graph_to_eps.h	Mon Jul 04 17:51:07 2005 +0000
     1.3 @@ -707,13 +707,15 @@
     1.4      }
     1.5      BoundingBox<double> bb;
     1.6      ///\bug: Chech whether the graph is empty.
     1.7 -    if(NodeIt(g)==INVALID) bb+=xy<double>(0,0);
     1.8      for(NodeIt n(g);n!=INVALID;++n) {
     1.9        double ns=_nodeSizes[n]*_nodeScale;
    1.10        xy<double> p(ns,ns);
    1.11        bb+=p+_coords[n];
    1.12        bb+=-p+_coords[n];
    1.13 -      }
    1.14 +    }
    1.15 +    if (bb.empty()) {
    1.16 +      bb = BoundingBox<double>(xy<double>(0,0));
    1.17 +    }
    1.18      if(_scaleToA4)
    1.19        os <<"%%BoundingBox: 0 0 596 842\n%%DocumentPaperSizes: a4\n";
    1.20      else os << "%%BoundingBox: "