Skip to content

Commit 46c51ea

Browse files
committed
Change how sub_source is constructed to fix build on windows
1 parent 1f569d1 commit 46c51ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ add_custom_command(
6868
${PROJECT_SOURCE_DIR}/python/pygerber_gerber_parser_cpp/gerber_parser$<TARGET_FILE_SUFFIX:PyGerberGerberParserCpp>
6969
)
7070

71-
CPMAddPackage("gh:catchorg/Catch2@3.3.2")
71+
CPMAddPackage("gh:catchorg/Catch2@3.7.1")
7272

7373

7474
add_executable(tests)

cpp/gerber/src/parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace gerber {
4242
}
4343

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

4747
if (sub_source.empty()) {
4848
return 0;

0 commit comments

Comments
 (0)