File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
22
22
ENDIF ()
23
23
24
24
ADD_LIBRARY (GerberParserCpp STATIC )
25
- TARGET_COMPILE_FEATURES (GerberParserCpp PRIVATE cxx_std_17 )
25
+ TARGET_COMPILE_FEATURES (GerberParserCpp PRIVATE cxx_std_20 )
26
26
SET_TARGET_PROPERTIES (GerberParserCpp
27
27
PROPERTIES POSITION_INDEPENDENT_CODE ON
28
28
)
@@ -52,7 +52,7 @@ CPMAddPackage(
52
52
)
53
53
54
54
pybind11_add_module (PyGerberGerberParserCpp cpp/python/gerber_parser.cpp )
55
- target_compile_features (PyGerberGerberParserCpp PRIVATE cxx_std_17 )
55
+ target_compile_features (PyGerberGerberParserCpp PRIVATE cxx_std_20 )
56
56
target_link_libraries (
57
57
PyGerberGerberParserCpp
58
58
PRIVATE
72
72
73
73
74
74
add_executable (tests )
75
- target_compile_features (tests PRIVATE cxx_std_17 )
75
+ target_compile_features (tests PRIVATE cxx_std_20 )
76
76
77
77
file (GLOB_RECURSE test_source_files ${PROJECT_SOURCE_DIR} /cpp/test/ *.test.cpp )
78
78
target_sources (tests PRIVATE ${test_source_files} )
Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
#include < cstdint>
3
+ #include < string>
3
4
#include < string_view>
4
5
5
6
namespace gerber {
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ namespace gerber {
42
42
}
43
43
44
44
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.end ()};
45
+ const std::string_view sub_source{source.begin () + index, source.size () - index};
46
+
46
47
if (sub_source.empty ()) {
47
48
return 0 ;
48
49
}
You can’t perform that action at this time.
0 commit comments