Fixed duplicate last line bug in load2D

release/4.3a0
Richard Roberts 2013-07-31 15:39:55 +00:00
parent 34998b3435
commit ba2ddb22d8
1 changed files with 4 additions and 2 deletions

View File

@ -91,7 +91,8 @@ pair<NonlinearFactorGraph::shared_ptr, Values::shared_ptr> load2D(
// load the poses
while (is) {
is >> tag;
if(! (is >> tag))
break;
if ((tag == "VERTEX2") || (tag == "VERTEX")) {
int id;
@ -113,7 +114,8 @@ pair<NonlinearFactorGraph::shared_ptr, Values::shared_ptr> load2D(
// load the factors
bool haveLandmark = false;
while (is) {
is >> tag;
if(! (is >> tag))
break;
if ((tag == "EDGE2") || (tag == "EDGE") || (tag == "ODOMETRY")) {
int id1, id2;