diff options
| author | Chris Dyer <redpony@gmail.com> | 2013-11-13 11:22:24 -0800 | 
|---|---|---|
| committer | Chris Dyer <redpony@gmail.com> | 2013-11-13 11:22:24 -0800 | 
| commit | 9be8d89b5a4065a81b26d8af1f3443d152e7922a (patch) | |
| tree | 237090ff519a0419c3ba379ec3a6884f05caa6c2 /utils | |
| parent | 8a24bb77bc2e9fd17a6f6529a2942cde96a6af49 (diff) | |
| parent | 4a9449a564e626fe004200b730bfaa44d6152e0f (diff) | |
Merge pull request #27 from pks/master
Tidying (soft) syntax features; loo for C++ extractor; updates for dtrain 
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/filelib.h | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/utils/filelib.h b/utils/filelib.h index b9ea3940..4fa69760 100644 --- a/utils/filelib.h +++ b/utils/filelib.h @@ -75,7 +75,10 @@ class ReadFile : public BaseFile<std::istream> {        }      }    } - +  void ReadAll(std::string& s) { +    getline(*stream(), s, (char) EOF); +    if (s.size() > 0) s.resize(s.size()-1); +  }  };  class WriteFile : public BaseFile<std::ostream> { | 
