COIN-OR::LEMON - Graph Library

Changeset 1068:e8afd887d706 in lemon


Ignore:
Timestamp:
08/04/11 21:12:46 (8 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
1.0
Parents:
1008:b7ed95cd94a3 (diff), 1067:54464584b157 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge #382 to branch 1.0

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/lgf_reader.h

    r519 r1068  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2008
     5 * Copyright (C) 2003-2011
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    966966        int index = 0;
    967967        while (_reader_bits::readToken(line, map)) {
     968          if(map == "-") {
     969              if(index!=0)
     970                throw FormatError("'-' is not allowed as a map name");
     971              else if (line >> std::ws >> c)
     972                throw FormatError("Extra character at the end of line");
     973              else break;
     974            }
    968975          if (maps.find(map) != maps.end()) {
    969976            std::ostringstream msg;
     
    18081815        int index = 0;
    18091816        while (_reader_bits::readToken(line, map)) {
     1817          if(map == "-") {
     1818              if(index!=0)
     1819                throw FormatError("'-' is not allowed as a map name");
     1820              else if (line >> std::ws >> c)
     1821                throw FormatError("Extra character at the end of line");
     1822              else break;
     1823            }
    18101824          if (maps.find(map) != maps.end()) {
    18111825            std::ostringstream msg;
  • lemon/lgf_reader.h

    r1067 r1068  
    848848        readLine();
    849849      }
    850       line.putback(c);
     850      if (readSuccess()) {
     851        line.putback(c);
     852      }
    851853    }
    852854
     
    16951697        readLine();
    16961698      }
    1697       line.putback(c);
     1699      if (readSuccess()) {
     1700        line.putback(c);
     1701      }
    16981702    }
    16991703
     
    22592263        readLine();
    22602264      }
    2261       line.putback(c);
     2265      if (readSuccess()) {
     2266        line.putback(c);
     2267      }
    22622268    }
    22632269
     
    26002606        readLine();
    26012607      }
    2602       line.putback(c);
     2608      if (readSuccess()) {
     2609        line.putback(c);
     2610      }
    26032611    }
    26042612
Note: See TracChangeset for help on using the changeset viewer.