Skip to content

Commit d5ca3c1

Browse files
committed
Fix pedantic warnings in examples
1 parent bfebda0 commit d5ca3c1

File tree

114 files changed

+720
-2460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+720
-2460
lines changed

examples/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
macro(add_matplot_example TARGET_NAME)
2+
add_executable(${TARGET_NAME} ${ARGN})
3+
target_link_libraries(${TARGET_NAME} PRIVATE matplot)
4+
maybe_target_pedantic_warnings(${TARGET_NAME})
5+
endmacro()
6+
17
add_subdirectory(line_plot)
28
add_subdirectory(data_distribution)
39
add_subdirectory(discrete_data)
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
add_executable(example_arrow_1 arrow_1.cpp)
2-
target_link_libraries(example_arrow_1 PUBLIC matplot)
3-
4-
add_executable(example_arrow_2 arrow_2.cpp)
5-
target_link_libraries(example_arrow_2 PUBLIC matplot)
6-
7-
8-
1+
add_matplot_example(example_arrow_1 arrow_1.cpp)
2+
add_matplot_example(example_arrow_2 arrow_2.cpp)
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
add_executable(example_ellipse_1 ellipse_1.cpp)
2-
target_link_libraries(example_ellipse_1 PUBLIC matplot)
3-
4-
5-
1+
add_matplot_example(example_ellipse_1 ellipse_1.cpp)
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
add_executable(example_fill_1 fill_1.cpp)
2-
target_link_libraries(example_fill_1 PUBLIC matplot)
3-
4-
5-
1+
add_matplot_example(example_fill_1 fill_1.cpp)
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
add_executable(example_line_1 line_1.cpp)
2-
target_link_libraries(example_line_1 PUBLIC matplot)
3-
4-
5-
1+
add_matplot_example(example_line_1 line_1.cpp)
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
add_executable(example_rectangle_1 rectangle_1.cpp)
2-
target_link_libraries(example_rectangle_1 PUBLIC matplot)
3-
4-
add_executable(example_rectangle_2 rectangle_2.cpp)
5-
target_link_libraries(example_rectangle_2 PUBLIC matplot)
6-
7-
add_executable(example_rectangle_3 rectangle_3.cpp)
8-
target_link_libraries(example_rectangle_3 PUBLIC matplot)
9-
10-
add_executable(example_rectangle_4 rectangle_4.cpp)
11-
target_link_libraries(example_rectangle_4 PUBLIC matplot)
12-
13-
add_executable(example_rectangle_5 rectangle_5.cpp)
14-
target_link_libraries(example_rectangle_5 PUBLIC matplot)
15-
16-
17-
1+
add_matplot_example(example_rectangle_1 rectangle_1.cpp)
2+
add_matplot_example(example_rectangle_2 rectangle_2.cpp)
3+
add_matplot_example(example_rectangle_3 rectangle_3.cpp)
4+
add_matplot_example(example_rectangle_4 rectangle_4.cpp)
5+
add_matplot_example(example_rectangle_5 rectangle_5.cpp)
Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
1-
add_executable(example_text_1 text_1.cpp)
2-
target_link_libraries(example_text_1 PUBLIC matplot)
3-
4-
add_executable(example_text_2 text_2.cpp)
5-
target_link_libraries(example_text_2 PUBLIC matplot)
6-
7-
add_executable(example_text_3 text_3.cpp)
8-
target_link_libraries(example_text_3 PUBLIC matplot)
9-
10-
add_executable(example_text_4 text_4.cpp)
11-
target_link_libraries(example_text_4 PUBLIC matplot)
12-
13-
add_executable(example_text_5 text_5.cpp)
14-
target_link_libraries(example_text_5 PUBLIC matplot)
15-
16-
add_executable(example_text_6 text_6.cpp)
17-
target_link_libraries(example_text_6 PUBLIC matplot)
18-
19-
add_executable(example_text_7 text_7.cpp)
20-
target_link_libraries(example_text_7 PUBLIC matplot)
21-
22-
add_executable(example_text_8 text_8.cpp)
23-
target_link_libraries(example_text_8 PUBLIC matplot)
1+
add_matplot_example(example_text_1 text_1.cpp)
2+
add_matplot_example(example_text_2 text_2.cpp)
3+
add_matplot_example(example_text_3 text_3.cpp)
4+
add_matplot_example(example_text_4 text_4.cpp)
5+
add_matplot_example(example_text_5 text_5.cpp)
6+
add_matplot_example(example_text_6 text_6.cpp)
7+
add_matplot_example(example_text_7 text_7.cpp)
8+
add_matplot_example(example_text_8 text_8.cpp)
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
add_executable(example_textarrow_1 textarrow_1.cpp)
2-
target_link_libraries(example_textarrow_1 PUBLIC matplot)
3-
4-
add_executable(example_textarrow_2 textarrow_2.cpp)
5-
target_link_libraries(example_textarrow_2 PUBLIC matplot)
6-
7-
8-
1+
add_matplot_example(example_textarrow_1 textarrow_1.cpp)
2+
add_matplot_example(example_textarrow_2 textarrow_2.cpp)
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
add_executable(example_textbox_1 textbox_1.cpp)
2-
target_link_libraries(example_textbox_1 PUBLIC matplot)
3-
4-
5-
1+
add_matplot_example(example_textbox_1 textbox_1.cpp)
Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
add_executable(example_axes_1 axes_1.cpp)
2-
target_link_libraries(example_axes_1 PUBLIC matplot)
3-
4-
add_executable(example_axes_2 axes_2.cpp)
5-
target_link_libraries(example_axes_2 PUBLIC matplot)
6-
7-
add_executable(example_axes_3 axes_3.cpp)
8-
target_link_libraries(example_axes_3 PUBLIC matplot)
9-
10-
add_executable(example_axes_4 axes_4.cpp)
11-
target_link_libraries(example_axes_4 PUBLIC matplot)
12-
13-
14-
1+
add_matplot_example(example_axes_1 axes_1.cpp)
2+
add_matplot_example(example_axes_2 axes_2.cpp)
3+
add_matplot_example(example_axes_3 axes_3.cpp)
4+
add_matplot_example(example_axes_4 axes_4.cpp)

0 commit comments

Comments
 (0)