Browse Source

Slight optimization when saving files

pipelines/235045657
eidheim 6 years ago
parent
commit
ba7c335073
  1. 3
      src/source.cc

3
src/source.cc

@ -405,7 +405,8 @@ bool Source::View::save() {
while(!end_reached) { while(!end_reached) {
if(!end_iter.forward_chars(131072)) if(!end_iter.forward_chars(131072))
end_reached = true; end_reached = true;
output << get_buffer()->get_text(start_iter, end_iter).raw(); auto text = get_buffer()->get_text(start_iter, end_iter).raw();
output.write(text.c_str(), text.size());
start_iter = end_iter; start_iter = end_iter;
} }
output.close(); output.close();

Loading…
Cancel
Save