Skip to content

Commit

Permalink
Improved performance of from_ascii_to_binary()
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoturri1966 committed Sep 4, 2023
1 parent 175f6d5 commit 6573d4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LibBGCode/convert/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ BGCODE_CONVERT_EXPORT EResult from_ascii_to_binary(FILE& src_file, FILE& dst_fil
if (parse_res != EResult::Success)
r.quit_parsing();

if (std::find(processed_lines.begin(), processed_lines.end(), lines_counter) == processed_lines.end())
if (!std::binary_search(processed_lines.begin(), processed_lines.end(), lines_counter))
binarizer.append_gcode(line.raw + "\n");

++lines_counter;
Expand Down

0 comments on commit 6573d4a

Please sign in to comment.