Skip to content

Commit

Permalink
Change how sub_source is constructed to fix build on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Argmaster committed Oct 10, 2024
1 parent 1f569d1 commit 46c51ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ add_custom_command(
${PROJECT_SOURCE_DIR}/python/pygerber_gerber_parser_cpp/gerber_parser$<TARGET_FILE_SUFFIX:PyGerberGerberParserCpp>
)

CPMAddPackage("gh:catchorg/Catch2@3.3.2")
CPMAddPackage("gh:catchorg/Catch2@3.7.1")


add_executable(tests)
Expand Down
2 changes: 1 addition & 1 deletion cpp/gerber/src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace gerber {
}

location_t Parser::parse_global(const std::string_view& source, const location_t& index) {
const std::string_view sub_source{source.begin() + index, source.size() - index};
const std::string_view sub_source = source.substr(index);

if (sub_source.empty()) {
return 0;
Expand Down

0 comments on commit 46c51ea

Please sign in to comment.