mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-27 15:22:00 +08:00
Fix pointer to long conversion warning.
This commit is contained in:
parent
0ed08fd281
commit
61a32f2a4c
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
#include <Eigen/Core>
|
#include <Eigen/Core>
|
||||||
|
|
||||||
|
using internal::UIntPtr;
|
||||||
|
|
||||||
#if EIGEN_HAS_RVALUE_REFERENCES
|
#if EIGEN_HAS_RVALUE_REFERENCES
|
||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
void rvalue_copyassign(const MatrixType& m)
|
void rvalue_copyassign(const MatrixType& m)
|
||||||
@ -20,11 +22,11 @@ void rvalue_copyassign(const MatrixType& m)
|
|||||||
|
|
||||||
// create a temporary which we are about to destroy by moving
|
// create a temporary which we are about to destroy by moving
|
||||||
MatrixType tmp = m;
|
MatrixType tmp = m;
|
||||||
long src_address = reinterpret_cast<long>(tmp.data());
|
UIntPtr src_address = reinterpret_cast<UIntPtr>(tmp.data());
|
||||||
|
|
||||||
// move the temporary to n
|
// move the temporary to n
|
||||||
MatrixType n = std::move(tmp);
|
MatrixType n = std::move(tmp);
|
||||||
long dst_address = reinterpret_cast<long>(n.data());
|
UIntPtr dst_address = reinterpret_cast<UIntPtr>(n.data());
|
||||||
|
|
||||||
if (MatrixType::RowsAtCompileTime==Dynamic|| MatrixType::ColsAtCompileTime==Dynamic)
|
if (MatrixType::RowsAtCompileTime==Dynamic|| MatrixType::ColsAtCompileTime==Dynamic)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user