diff --git a/_pyceres/core/crs_matrix.h b/_pyceres/core/crs_matrix.h index 0d43e83..c21577b 100644 --- a/_pyceres/core/crs_matrix.h +++ b/_pyceres/core/crs_matrix.h @@ -17,9 +17,9 @@ py::tuple ConvertCRSToPyTuple(const ceres::CRSMatrix& crsMatrix) { py::array_t rows(n_values), cols(n_values); py::array_t values(n_values); - int* rows_data = static_cast(rows.request().ptr); - int* cols_data = static_cast(cols.request().ptr); - double* values_data = static_cast(values.request().ptr); + int* const rows_data = static_cast(rows.request().ptr); + int* const cols_data = static_cast(cols.request().ptr); + double* const values_data = static_cast(values.request().ptr); int counter = 0; for (int row = 0; row < crsMatrix.num_rows; ++row) {