Fix clang16 compiler warnings Fixes the following two warnings: preconditioner.h:64:11: warning: field 'f_block_size' will be initialized after field 'elimination_groups' [-Wreorder-ctor] block_sparse_matrix.cc:70:19: warning: unused parameter 'values' [-Wunused-parameter] Change-Id: I5cc55ca387b3f12259096c1531c263279650bd49
diff --git a/internal/ceres/block_sparse_matrix.cc b/internal/ceres/block_sparse_matrix.cc index 909389c..2efee39 100644 --- a/internal/ceres/block_sparse_matrix.cc +++ b/internal/ceres/block_sparse_matrix.cc
@@ -67,7 +67,6 @@ template <bool transpose> std::unique_ptr<CompressedRowSparseMatrix> CreateStructureOfCompressedRowSparseMatrix( - const double* values, int num_rows, int num_cols, int num_nonzeros, @@ -451,7 +450,7 @@ BlockSparseMatrix::ToCompressedRowSparseMatrixTranspose() const { auto bs = transpose_block_structure_.get(); auto crs_matrix = CreateStructureOfCompressedRowSparseMatrix<true>( - values(), num_cols_, num_rows_, num_nonzeros_, bs); + num_cols_, num_rows_, num_nonzeros_, bs); SetBlockStructureOfCompressedRowSparseMatrix(crs_matrix.get(), bs); @@ -462,7 +461,7 @@ std::unique_ptr<CompressedRowSparseMatrix> BlockSparseMatrix::ToCompressedRowSparseMatrix() const { auto crs_matrix = CreateStructureOfCompressedRowSparseMatrix<false>( - values(), num_rows_, num_cols_, num_nonzeros_, block_structure_.get()); + num_rows_, num_cols_, num_nonzeros_, block_structure_.get()); SetBlockStructureOfCompressedRowSparseMatrix(crs_matrix.get(), block_structure_.get());
diff --git a/internal/ceres/preconditioner.h b/internal/ceres/preconditioner.h index 07a7b1f..42dc6cc 100644 --- a/internal/ceres/preconditioner.h +++ b/internal/ceres/preconditioner.h
@@ -59,10 +59,10 @@ sparse_linear_algebra_library_type( linear_solver_options.sparse_linear_algebra_library_type), num_threads(linear_solver_options.num_threads), + elimination_groups(linear_solver_options.elimination_groups), row_block_size(linear_solver_options.row_block_size), e_block_size(linear_solver_options.e_block_size), f_block_size(linear_solver_options.f_block_size), - elimination_groups(linear_solver_options.elimination_groups), context(linear_solver_options.context) {} PreconditionerType type = JACOBI;