From 6352524bd52926eb186b4ca841a9b41068d9262e Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 13 Dec 2018 00:06:05 +0100 Subject: [PATCH] Avoid C-style casts in examples --- examples/step-42/step-42.cc | 4 ++-- examples/step-60/step-60.cc | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/step-42/step-42.cc b/examples/step-42/step-42.cc index 9f26118107..2006200602 100644 --- a/examples/step-42/step-42.cc +++ b/examples/step-42/step-42.cc @@ -509,8 +509,8 @@ namespace Step42 template double BitmapFile::get_value(const double x, const double y) const { - const int ix = std::min(std::max((int)(x / hx), 0), nx - 2); - const int iy = std::min(std::max((int)(y / hy), 0), ny - 2); + const int ix = std::min(std::max(static_cast(x / hx), 0), nx - 2); + const int iy = std::min(std::max(static_cast(y / hy), 0), ny - 2); const double xi = std::min(std::max((x - ix * hx) / hx, 1.), 0.); const double eta = std::min(std::max((y - iy * hy) / hy, 1.), 0.); diff --git a/examples/step-60/step-60.cc b/examples/step-60/step-60.cc index ff958d9694..6e74b01e8d 100644 --- a/examples/step-60/step-60.cc +++ b/examples/step-60/step-60.cc @@ -927,12 +927,12 @@ namespace Step60 TimerOutput::Scope timer_section(monitor, "Assemble system"); // Embedding stiffness matrix $K$, and the right hand side $G$. - MatrixTools::create_laplace_matrix(*space_dh, - QGauss(2 * space_fe->degree + - 1), - stiffness_matrix, - (const Function *)nullptr, - constraints); + MatrixTools::create_laplace_matrix( + *space_dh, + QGauss(2 * space_fe->degree + 1), + stiffness_matrix, + static_cast *>(nullptr), + constraints); VectorTools::create_right_hand_side(*embedded_mapping, *embedded_dh, -- 2.39.5