summaryrefslogtreecommitdiff
path: root/textblob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'textblob.cpp')
-rw-r--r--textblob.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/textblob.cpp b/textblob.cpp
index 544b26e..65fa1b0 100644
--- a/textblob.cpp
+++ b/textblob.cpp
@@ -52,11 +52,9 @@ void TextBlob::clear(){
void TextBlob::read(istream &is){
lines.clear();
- while(true){
- lines.emplace_back();
- getline(is,lines.back());
- if(lines.back().size()==0)break;
- if(!is)break;
+ string ln;
+ while(getline(is,ln)){
+ lines.push_back(move(ln));
}
}