Skip to content

Commit 65d5917

Browse files
committed
Fix MSVC pedantic warnings
1 parent e313d10 commit 65d5917

File tree

38 files changed

+94
-82
lines changed

38 files changed

+94
-82
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#######################################################
44
# Project information
55
cmake_minimum_required(VERSION 3.14)
6-
project(matplotplusplus VERSION 1.0.2)
6+
project(matplotplusplus VERSION 1.1.0)
77
set(CMAKE_CXX_STANDARD 17)
88
set(CMAKE_C_STANDARD 11)
99
set(MATPLOT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})

examples/annotations/rectangle/rectangle_1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main() {
1212

1313
auto r2 = rectangle(6.5, 4.5, 1, 1);
1414
r2->fill(true);
15-
r2->color({0.8, 0, 0, 1});
15+
r2->color({0.8f, 0.f, 0.f, 1.f});
1616

1717
show();
1818
return 0;

examples/appearance/axes/axes_2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
int main() {
88
using namespace matplot;
9-
auto ax1 = axes({0.1, 0.1, 0.7, 0.7});
10-
auto ax2 = axes({0.65, 0.65, 0.28, 0.28});
9+
auto ax1 = axes({0.1f, 0.1f, 0.7f, 0.7f});
10+
auto ax2 = axes({0.65f, 0.65f, 0.28f, 0.28f});
1111

1212
auto [X, Y, Z] = peaks(20);
1313
contour(ax1, X, Y, Z);

examples/appearance/axes/axes_3.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
int main() {
88
using namespace matplot;
9-
auto ax1 = axes({0.1, 0.1, 0.6, 0.6});
10-
auto ax2 = axes({0.35, 0.35, 0.6, 0.6});
9+
auto ax1 = axes({0.1f, 0.1f, 0.6f, 0.6f});
10+
auto ax2 = axes({0.35f, 0.35f, 0.6f, 0.6f});
1111

1212
ax1->box(true);
1313
ax2->box(true);

examples/appearance/camera/lighting/lighting_2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ int main() {
44
using namespace matplot;
55

66
auto [x, y, z] = peaks();
7-
surf(x, y, z)->lighting(true).primary(0.2);
7+
surf(x, y, z)->lighting(true).primary(0.2f);
88

99
show();
1010
return 0;

examples/appearance/camera/lighting/lighting_3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ int main() {
44
using namespace matplot;
55

66
auto [x, y, z] = peaks();
7-
surf(x, y, z)->lighting(true).primary(0.8);
7+
surf(x, y, z)->lighting(true).primary(0.8f);
88

99
show();
1010
return 0;

examples/appearance/camera/lighting/lighting_4.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ int main() {
44
using namespace matplot;
55

66
auto [x, y, z] = peaks();
7-
surf(x, y, z)->lighting(true).specular(0.2);
7+
surf(x, y, z)->lighting(true).specular(0.2f);
88

99
show();
1010
return 0;

examples/appearance/camera/lighting/lighting_5.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ int main() {
44
using namespace matplot;
55

66
auto [x, y, z] = peaks();
7-
surf(x, y, z)->lighting(true).specular(0.8);
7+
surf(x, y, z)->lighting(true).specular(0.8f);
88

99
show();
1010
return 0;

examples/appearance/camera/view/view_6.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ int main() {
1010

1111
gcf()->width(gcf()->width() * 2);
1212
subplot(1, 2, 0);
13-
fsurf(ackley)->lighting(true).primary(0.7).specular(0.9);
13+
fsurf(ackley)->lighting(true).primary(0.7f).specular(0.9f);
1414
subplot(1, 2, 1);
1515
fsurf(ackley);
1616
rotate(20, 30);

examples/appearance/colormaps/colorbar/colorbar_2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ int main() {
55

66
auto [x, y, z] = peaks();
77
contourf(x, y, z, 20);
8-
gca()->cb_position({0, 0, 1, 0.06});
8+
gca()->cb_position({0.f, 0.f, 1.f, 0.06f});
99

1010
show();
1111
return 0;

0 commit comments

Comments
 (0)