GCodeViewer slight opitmization: reuse (move) G-code line indices

in G-code viewer.
This commit is contained in:
Vojtech Bubnik 2021-09-13 10:41:21 +02:00
parent 5a95794913
commit 880feb3a3d
5 changed files with 8 additions and 11 deletions

View file

@ -702,7 +702,7 @@ public:
public:
GCodeWindow() = default;
~GCodeWindow() { stop_mapping_file(); }
void load_gcode(const std::string& filename, const std::vector<size_t> &lines_ends);
void load_gcode(const std::string& filename, std::vector<size_t> &&lines_ends);
void reset() {
stop_mapping_file();
m_lines_ends.clear();