From 62c504e7bf62460b4c33f479abea789d18a9ad89 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 22 Jun 2012 16:32:45 +0200 Subject: fix most of the shadow warnings in Core/*.h --- Eigen/src/Core/Swap.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'Eigen/src/Core/Swap.h') diff --git a/Eigen/src/Core/Swap.h b/Eigen/src/Core/Swap.h index deb1d2831..02c5efe51 100644 --- a/Eigen/src/Core/Swap.h +++ b/Eigen/src/Core/Swap.h @@ -64,9 +64,9 @@ template class SwapWrapper inline ScalarWithConstIfNotLvalue* data() { return m_expression.data(); } inline const Scalar* data() const { return m_expression.data(); } - inline Scalar& coeffRef(Index row, Index col) + inline Scalar& coeffRef(Index rowId, Index colId) { - return m_expression.const_cast_derived().coeffRef(row, col); + return m_expression.const_cast_derived().coeffRef(rowId, colId); } inline Scalar& coeffRef(Index index) @@ -74,9 +74,9 @@ template class SwapWrapper return m_expression.const_cast_derived().coeffRef(index); } - inline Scalar& coeffRef(Index row, Index col) const + inline Scalar& coeffRef(Index rowId, Index colId) const { - return m_expression.coeffRef(row, col); + return m_expression.coeffRef(rowId, colId); } inline Scalar& coeffRef(Index index) const @@ -85,14 +85,14 @@ template class SwapWrapper } template - void copyCoeff(Index row, Index col, const DenseBase& other) + void copyCoeff(Index rowId, Index colId, const DenseBase& other) { OtherDerived& _other = other.const_cast_derived(); - eigen_internal_assert(row >= 0 && row < rows() - && col >= 0 && col < cols()); - Scalar tmp = m_expression.coeff(row, col); - m_expression.coeffRef(row, col) = _other.coeff(row, col); - _other.coeffRef(row, col) = tmp; + eigen_internal_assert(rowId >= 0 && rowId < rows() + && colId >= 0 && colId < cols()); + Scalar tmp = m_expression.coeff(rowId, colId); + m_expression.coeffRef(rowId, colId) = _other.coeff(rowId, colId); + _other.coeffRef(rowId, colId) = tmp; } template @@ -106,16 +106,16 @@ template class SwapWrapper } template - void copyPacket(Index row, Index col, const DenseBase& other) + void copyPacket(Index rowId, Index colId, const DenseBase& other) { OtherDerived& _other = other.const_cast_derived(); - eigen_internal_assert(row >= 0 && row < rows() - && col >= 0 && col < cols()); - Packet tmp = m_expression.template packet(row, col); - m_expression.template writePacket(row, col, - _other.template packet(row, col) + eigen_internal_assert(rowId >= 0 && rowId < rows() + && colId >= 0 && colId < cols()); + Packet tmp = m_expression.template packet(rowId, colId); + m_expression.template writePacket(rowId, colId, + _other.template packet(rowId, colId) ); - _other.template writePacket(row, col, tmp); + _other.template writePacket(rowId, colId, tmp); } template -- cgit v1.2.3