# HG changeset patch
# User Daniel Poroszkai <poroszd@inf.elte.hu>
# Date 1328396684 -3600
# Node ID a4a945914af3e7c3c798b763899229b9e1d05009
# Parent  7b95667b0241007b7f725d0bf286f7bbdb82920e
Update LGF reader to work with typesafe bipartite node sets

diff --git a/lemon/lgf_reader.h b/lemon/lgf_reader.h
--- a/lemon/lgf_reader.h
+++ b/lemon/lgf_reader.h
@@ -2953,7 +2953,10 @@
             throw FormatError(msg.str());
           }
 
-          e = _graph.addEdge(source, target);
+          // It is checked that source is red and
+          // target is blue, so this should be safe:
+          e = _graph.addEdge(_graph.asRedNodeUnsafe(source),
+                             _graph.asBlueNodeUnsafe(target));
           if (label_index != -1)
             _edge_index.insert(std::make_pair(tokens[label_index], e));
         } else {
