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

+6
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)
+2-8
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)
+1-5
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)
+1-5
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)
+1-5
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)
+5-17
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)
+8-23
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)
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)
+1-5
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)
+4-14
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)
+8-23
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
1-
add_executable(example_axis_1 axis_1.cpp)
2-
target_link_libraries(example_axis_1 PUBLIC matplot)
3-
4-
add_executable(example_axis_2 axis_2.cpp)
5-
target_link_libraries(example_axis_2 PUBLIC matplot)
6-
7-
add_executable(example_axis_3 axis_3.cpp)
8-
target_link_libraries(example_axis_3 PUBLIC matplot)
9-
10-
add_executable(example_axis_4 axis_4.cpp)
11-
target_link_libraries(example_axis_4 PUBLIC matplot)
12-
13-
add_executable(example_axis_5 axis_5.cpp)
14-
target_link_libraries(example_axis_5 PUBLIC matplot)
15-
16-
add_executable(example_axis_6 axis_6.cpp)
17-
target_link_libraries(example_axis_6 PUBLIC matplot)
18-
19-
add_executable(example_axis_7 axis_7.cpp)
20-
target_link_libraries(example_axis_7 PUBLIC matplot)
21-
22-
add_executable(example_axis_8 axis_8.cpp)
23-
target_link_libraries(example_axis_8 PUBLIC matplot)
1+
add_matplot_example(example_axis_1 axis_1.cpp)
2+
add_matplot_example(example_axis_2 axis_2.cpp)
3+
add_matplot_example(example_axis_3 axis_3.cpp)
4+
add_matplot_example(example_axis_4 axis_4.cpp)
5+
add_matplot_example(example_axis_5 axis_5.cpp)
6+
add_matplot_example(example_axis_6 axis_6.cpp)
7+
add_matplot_example(example_axis_7 axis_7.cpp)
8+
add_matplot_example(example_axis_8 axis_8.cpp)
+3-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
add_executable(example_box_1 box_1.cpp)
2-
target_link_libraries(example_box_1 PUBLIC matplot)
3-
4-
add_executable(example_box_2 box_2.cpp)
5-
target_link_libraries(example_box_2 PUBLIC matplot)
6-
7-
add_executable(example_box_3 box_3.cpp)
8-
target_link_libraries(example_box_3 PUBLIC matplot)
9-
10-
11-
1+
add_matplot_example(example_box_1 box_1.cpp)
2+
add_matplot_example(example_box_2 box_2.cpp)
3+
add_matplot_example(example_box_3 box_3.cpp)
+6-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
add_executable(example_xlim_1 xlim_1.cpp)
2-
target_link_libraries(example_xlim_1 PUBLIC matplot)
3-
4-
add_executable(example_xlim_2 xlim_2.cpp)
5-
target_link_libraries(example_xlim_2 PUBLIC matplot)
6-
7-
add_executable(example_xlim_3 xlim_3.cpp)
8-
target_link_libraries(example_xlim_3 PUBLIC matplot)
9-
10-
add_executable(example_xlim_4 xlim_4.cpp)
11-
target_link_libraries(example_xlim_4 PUBLIC matplot)
12-
13-
add_executable(example_xlim_5 xlim_5.cpp)
14-
target_link_libraries(example_xlim_5 PUBLIC matplot)
15-
16-
add_executable(example_xlim_6 xlim_6.cpp)
17-
target_link_libraries(example_xlim_6 PUBLIC matplot)
18-
19-
20-
1+
add_matplot_example(example_xlim_1 xlim_1.cpp)
2+
add_matplot_example(example_xlim_2 xlim_2.cpp)
3+
add_matplot_example(example_xlim_3 xlim_3.cpp)
4+
add_matplot_example(example_xlim_4 xlim_4.cpp)
5+
add_matplot_example(example_xlim_5 xlim_5.cpp)
6+
add_matplot_example(example_xlim_6 xlim_6.cpp)
+6-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
add_executable(example_ylim_1 ylim_1.cpp)
2-
target_link_libraries(example_ylim_1 PUBLIC matplot)
3-
4-
add_executable(example_ylim_2 ylim_2.cpp)
5-
target_link_libraries(example_ylim_2 PUBLIC matplot)
6-
7-
add_executable(example_ylim_3 ylim_3.cpp)
8-
target_link_libraries(example_ylim_3 PUBLIC matplot)
9-
10-
add_executable(example_ylim_4 ylim_4.cpp)
11-
target_link_libraries(example_ylim_4 PUBLIC matplot)
12-
13-
add_executable(example_ylim_5 ylim_5.cpp)
14-
target_link_libraries(example_ylim_5 PUBLIC matplot)
15-
16-
add_executable(example_ylim_6 ylim_6.cpp)
17-
target_link_libraries(example_ylim_6 PUBLIC matplot)
18-
19-
20-
1+
add_matplot_example(example_ylim_1 ylim_1.cpp)
2+
add_matplot_example(example_ylim_2 ylim_2.cpp)
3+
add_matplot_example(example_ylim_3 ylim_3.cpp)
4+
add_matplot_example(example_ylim_4 ylim_4.cpp)
5+
add_matplot_example(example_ylim_5 ylim_5.cpp)
6+
add_matplot_example(example_ylim_6 ylim_6.cpp)
+6-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
add_executable(example_zlim_1 zlim_1.cpp)
2-
target_link_libraries(example_zlim_1 PUBLIC matplot)
3-
4-
add_executable(example_zlim_2 zlim_2.cpp)
5-
target_link_libraries(example_zlim_2 PUBLIC matplot)
6-
7-
add_executable(example_zlim_3 zlim_3.cpp)
8-
target_link_libraries(example_zlim_3 PUBLIC matplot)
9-
10-
add_executable(example_zlim_4 zlim_4.cpp)
11-
target_link_libraries(example_zlim_4 PUBLIC matplot)
12-
13-
add_executable(example_zlim_5 zlim_5.cpp)
14-
target_link_libraries(example_zlim_5 PUBLIC matplot)
15-
16-
add_executable(example_zlim_6 zlim_6.cpp)
17-
target_link_libraries(example_zlim_6 PUBLIC matplot)
18-
19-
20-
1+
add_matplot_example(example_zlim_1 zlim_1.cpp)
2+
add_matplot_example(example_zlim_2 zlim_2.cpp)
3+
add_matplot_example(example_zlim_3 zlim_3.cpp)
4+
add_matplot_example(example_zlim_4 zlim_4.cpp)
5+
add_matplot_example(example_zlim_5 zlim_5.cpp)
6+
add_matplot_example(example_zlim_6 zlim_6.cpp)
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
1-
add_executable(example_lighting_1 lighting_1.cpp)
2-
target_link_libraries(example_lighting_1 PUBLIC matplot)
3-
4-
add_executable(example_lighting_2 lighting_2.cpp)
5-
target_link_libraries(example_lighting_2 PUBLIC matplot)
6-
7-
add_executable(example_lighting_3 lighting_3.cpp)
8-
target_link_libraries(example_lighting_3 PUBLIC matplot)
9-
10-
add_executable(example_lighting_4 lighting_4.cpp)
11-
target_link_libraries(example_lighting_4 PUBLIC matplot)
12-
13-
add_executable(example_lighting_5 lighting_5.cpp)
14-
target_link_libraries(example_lighting_5 PUBLIC matplot)
15-
16-
add_executable(example_lighting_6 lighting_6.cpp)
17-
target_link_libraries(example_lighting_6 PUBLIC matplot)
1+
add_matplot_example(example_lighting_1 lighting_1.cpp)
2+
add_matplot_example(example_lighting_2 lighting_2.cpp)
3+
add_matplot_example(example_lighting_3 lighting_3.cpp)
4+
add_matplot_example(example_lighting_4 lighting_4.cpp)
5+
add_matplot_example(example_lighting_5 lighting_5.cpp)
6+
add_matplot_example(example_lighting_6 lighting_6.cpp)
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
1-
add_executable(example_view_1 view_1.cpp)
2-
target_link_libraries(example_view_1 PUBLIC matplot)
3-
4-
add_executable(example_view_2 view_2.cpp)
5-
target_link_libraries(example_view_2 PUBLIC matplot)
6-
7-
add_executable(example_view_3 view_3.cpp)
8-
target_link_libraries(example_view_3 PUBLIC matplot)
9-
10-
add_executable(example_view_4 view_4.cpp)
11-
target_link_libraries(example_view_4 PUBLIC matplot)
12-
13-
add_executable(example_view_5 view_5.cpp)
14-
target_link_libraries(example_view_5 PUBLIC matplot)
15-
16-
add_executable(example_view_6 view_6.cpp)
17-
target_link_libraries(example_view_6 PUBLIC matplot)
1+
add_matplot_example(example_view_1 view_1.cpp)
2+
add_matplot_example(example_view_2 view_2.cpp)
3+
add_matplot_example(example_view_3 view_3.cpp)
4+
add_matplot_example(example_view_4 view_4.cpp)
5+
add_matplot_example(example_view_5 view_5.cpp)
6+
add_matplot_example(example_view_6 view_6.cpp)
+3-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
add_executable(example_cla_1 cla_1.cpp)
2-
target_link_libraries(example_cla_1 PUBLIC matplot)
3-
4-
add_executable(example_cla_2 cla_2.cpp)
5-
target_link_libraries(example_cla_2 PUBLIC matplot)
6-
7-
add_executable(example_cla_3 cla_3.cpp)
8-
target_link_libraries(example_cla_3 PUBLIC matplot)
9-
10-
11-
1+
add_matplot_example(example_cla_1 cla_1.cpp)
2+
add_matplot_example(example_cla_2 cla_2.cpp)
3+
add_matplot_example(example_cla_3 cla_3.cpp)
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1-
add_executable(example_colorbar_1 colorbar_1.cpp)
2-
target_link_libraries(example_colorbar_1 PUBLIC matplot)
3-
4-
add_executable(example_colorbar_2 colorbar_2.cpp)
5-
target_link_libraries(example_colorbar_2 PUBLIC matplot)
6-
7-
add_executable(example_colorbar_3 colorbar_3.cpp)
8-
target_link_libraries(example_colorbar_3 PUBLIC matplot)
9-
10-
add_executable(example_colorbar_4 colorbar_4.cpp)
11-
target_link_libraries(example_colorbar_4 PUBLIC matplot)
12-
13-
add_executable(example_colorbar_5 colorbar_5.cpp)
14-
target_link_libraries(example_colorbar_5 PUBLIC matplot)
15-
16-
add_executable(example_colorbar_6 colorbar_6.cpp)
17-
target_link_libraries(example_colorbar_6 PUBLIC matplot)
18-
19-
add_executable(example_colorbar_7 colorbar_7.cpp)
20-
target_link_libraries(example_colorbar_7 PUBLIC matplot)
21-
22-
1+
add_matplot_example(example_colorbar_1 colorbar_1.cpp)
2+
add_matplot_example(example_colorbar_2 colorbar_2.cpp)
3+
add_matplot_example(example_colorbar_3 colorbar_3.cpp)
4+
add_matplot_example(example_colorbar_4 colorbar_4.cpp)
5+
add_matplot_example(example_colorbar_5 colorbar_5.cpp)
6+
add_matplot_example(example_colorbar_6 colorbar_6.cpp)
7+
add_matplot_example(example_colorbar_7 colorbar_7.cpp)
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
1-
add_executable(example_colormap_1 colormap_1.cpp)
2-
target_link_libraries(example_colormap_1 PUBLIC matplot)
3-
4-
add_executable(example_colormap_2 colormap_2.cpp)
5-
target_link_libraries(example_colormap_2 PUBLIC matplot)
6-
7-
add_executable(example_colormap_3 colormap_3.cpp)
8-
target_link_libraries(example_colormap_3 PUBLIC matplot)
9-
10-
add_executable(example_colormap_4 colormap_4.cpp)
11-
target_link_libraries(example_colormap_4 PUBLIC matplot)
12-
13-
add_executable(example_colormap_5 colormap_5.cpp)
14-
target_link_libraries(example_colormap_5 PUBLIC matplot)
15-
16-
add_executable(example_colormap_6 colormap_6.cpp)
17-
target_link_libraries(example_colormap_6 PUBLIC matplot)
18-
19-
add_executable(example_colormap_7 colormap_7.cpp)
20-
target_link_libraries(example_colormap_7 PUBLIC matplot)
21-
22-
add_executable(example_colormap_8 colormap_8.cpp)
23-
target_link_libraries(example_colormap_8 PUBLIC matplot)
24-
25-
add_executable(example_colormap_9 colormap_9.cpp)
26-
target_link_libraries(example_colormap_9 PUBLIC matplot)
1+
add_matplot_example(example_colormap_1 colormap_1.cpp)
2+
add_matplot_example(example_colormap_2 colormap_2.cpp)
3+
add_matplot_example(example_colormap_3 colormap_3.cpp)
4+
add_matplot_example(example_colormap_4 colormap_4.cpp)
5+
add_matplot_example(example_colormap_5 colormap_5.cpp)
6+
add_matplot_example(example_colormap_6 colormap_6.cpp)
7+
add_matplot_example(example_colormap_7 colormap_7.cpp)
8+
add_matplot_example(example_colormap_8 colormap_8.cpp)
9+
add_matplot_example(example_colormap_9 colormap_9.cpp)

0 commit comments

Comments
 (0)