@@ -854,7 +854,7 @@ void GraphicsContextRenderer::draw_gouraud_triangles(
854
854
if (&gc != this ) {
855
855
throw std::invalid_argument{" non-matching GraphicsContext" };
856
856
}
857
- auto const & ac = _additional_context ();
857
+ [[maybe_unused]] auto const & ac = _additional_context ();
858
858
auto mtx = matrix_from_transform (transform, get_additional_state ().height );
859
859
auto const & tri_raw = triangles.unchecked <3 >();
860
860
auto const & col_raw = colors.unchecked <3 >();
@@ -892,7 +892,7 @@ void GraphicsContextRenderer::draw_image(
892
892
if (&gc != this ) {
893
893
throw std::invalid_argument{" non-matching GraphicsContext" };
894
894
}
895
- auto const & ac = _additional_context ();
895
+ [[maybe_unused]] auto const & ac = _additional_context ();
896
896
auto const & im_raw = im.unchecked <3 >();
897
897
auto const & height = im_raw.shape (0 ), width = im_raw.shape (1 );
898
898
if (im_raw.shape (2 ) != 4 ) {
@@ -974,7 +974,7 @@ void GraphicsContextRenderer::draw_path(
974
974
if (&gc != this ) {
975
975
throw std::invalid_argument{" non-matching GraphicsContext" };
976
976
}
977
- auto const & ac = _additional_context ();
977
+ [[maybe_unused]] auto const & ac = _additional_context ();
978
978
auto path_loaded = false ;
979
979
auto mtx = matrix_from_transform (transform, get_additional_state ().height );
980
980
auto const & load_path = [&] {
@@ -1064,7 +1064,7 @@ void maybe_multithread(cairo_t* cr, int n, T /* lambda */ worker) {
1064
1064
worker, ctx, chunk_size * i, std::min<int >(chunk_size * (i + 1 ), n));
1065
1065
}
1066
1066
{
1067
- auto const & nogil = py::gil_scoped_release{};
1067
+ [[maybe_unused]] auto const & nogil = py::gil_scoped_release{};
1068
1068
for (auto & thread: threads) {
1069
1069
thread.join ();
1070
1070
}
@@ -1094,7 +1094,7 @@ void GraphicsContextRenderer::draw_markers(
1094
1094
if (&gc != this ) {
1095
1095
throw std::invalid_argument{" non-matching GraphicsContext" };
1096
1096
}
1097
- auto const & ac = _additional_context ();
1097
+ [[maybe_unused]] auto const & ac = _additional_context ();
1098
1098
1099
1099
// As paths store their vertices in an array, the .cast<>() will not make a
1100
1100
// copy and we don't need to explicitly keep the intermediate result alive.
@@ -1303,7 +1303,7 @@ void GraphicsContextRenderer::draw_path_collection(
1303
1303
if (&gc != this ) {
1304
1304
throw std::invalid_argument{" non-matching GraphicsContext" };
1305
1305
}
1306
- auto const & ac = _additional_context ();
1306
+ [[maybe_unused]] auto const & ac = _additional_context ();
1307
1307
auto const & old_snap = get_additional_state ().snap ;
1308
1308
get_additional_state ().snap = false ;
1309
1309
@@ -1433,7 +1433,7 @@ void GraphicsContextRenderer::draw_quad_mesh(
1433
1433
if (&gc != this ) {
1434
1434
throw std::invalid_argument{" non-matching GraphicsContext" };
1435
1435
}
1436
- auto const & ac = _additional_context ();
1436
+ [[maybe_unused]] auto const & ac = _additional_context ();
1437
1437
auto mtx =
1438
1438
matrix_from_transform (master_transform, get_additional_state ().height );
1439
1439
auto const & fcs_raw = fcs.unchecked <2 >(),
@@ -1535,7 +1535,7 @@ void GraphicsContextRenderer::draw_text(
1535
1535
if (&gc != this ) {
1536
1536
throw std::invalid_argument{" non-matching GraphicsContext" };
1537
1537
}
1538
- auto const & ac = _additional_context ();
1538
+ [[maybe_unused]] auto const & ac = _additional_context ();
1539
1539
if (ismath) {
1540
1540
// NOTE: This uses unhinted metrics for parsing/positioning but normal
1541
1541
// hinting for rendering, not sure whether this is a problem...
@@ -1780,7 +1780,7 @@ void MathtextBackend::draw(
1780
1780
// state. even though nothing is written.
1781
1781
return ;
1782
1782
}
1783
- auto const & ac = gcr._additional_context ();
1783
+ [[maybe_unused]] auto const & ac = gcr._additional_context ();
1784
1784
auto const & cr = gcr.cr_ ;
1785
1785
auto const & dpi = get_additional_state (cr).dpi ;
1786
1786
cairo_translate (cr, x, y);
0 commit comments