From df420d816421c14a636913934f6b29692036116d Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 16 Feb 2018 15:58:22 +0100 Subject: [PATCH] Replace operator[] in dof_info.h where necessary --- include/deal.II/matrix_free/dof_info.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/include/deal.II/matrix_free/dof_info.h b/include/deal.II/matrix_free/dof_info.h index 8456dbd74d..1ee78f453a 100644 --- a/include/deal.II/matrix_free/dof_info.h +++ b/include/deal.II/matrix_free/dof_info.h @@ -432,7 +432,9 @@ namespace internal AssertIndexRange (row, row_starts.size()-1); const unsigned int index = row_starts[row][0]; AssertIndexRange(index, dof_indices.size()+1); - return dof_indices.empty() ? nullptr : &dof_indices[index]; + return dof_indices.empty() ? + nullptr : + dof_indices.data()+index; } @@ -444,7 +446,9 @@ namespace internal AssertIndexRange (row, row_starts.size()-1); const unsigned int index = row_starts[row+1][0]; AssertIndexRange(index, dof_indices.size()+1); - return dof_indices.empty() ? nullptr : &dof_indices[index]; + return dof_indices.empty() ? + nullptr : + dof_indices.data()+index; } @@ -466,7 +470,9 @@ namespace internal AssertIndexRange (row, row_starts.size()-1); const unsigned int index = row_starts[row][1]; AssertIndexRange (index, constraint_indicator.size()+1); - return constraint_indicator.empty() ? nullptr : &constraint_indicator[index]; + return constraint_indicator.empty() ? + nullptr : + constraint_indicator.data()+index; } @@ -478,7 +484,9 @@ namespace internal AssertIndexRange (row, row_starts.size()-1); const unsigned int index = row_starts[row+1][1]; AssertIndexRange (index, constraint_indicator.size()+1); - return constraint_indicator.empty() ? nullptr : &constraint_indicator[index]; + return constraint_indicator.empty() ? + nullptr : + constraint_indicator.data()+index; } @@ -509,7 +517,9 @@ namespace internal AssertDimension (row_starts.size(), row_starts_plain_indices.size()); const unsigned int index = row_starts_plain_indices[row]; AssertIndexRange(index, plain_dof_indices.size()+1); - return plain_dof_indices.empty() ? nullptr : &plain_dof_indices[index]; + return plain_dof_indices.empty() ? + nullptr : + plain_dof_indices.data()+index; } } -- 2.39.5