Permalink
Browse files

Avoid ambiguity with Eigen rows/cols count serialization 2

  • Loading branch information...
jolting committed Sep 22, 2018
1 parent 6cf2e95 commit 8d76a651b3fe8011328b33fd5a77b4e58b882c72
Showing with 3 additions and 3 deletions.
  1. +3 −3 libs/math/src/CMatrixD.cpp
@@ -24,7 +24,7 @@ uint8_t CMatrixD::serializeGetVersion() const { return 0; }
void CMatrixD::serializeTo(mrpt::serialization::CArchive& out) const
{
// First, write the number of rows and columns:
out << (uint32_t)rows() << (uint32_t)cols();
out << static_cast<uint32_t>(rows()) << static_cast<uint32_t>(cols());

if (rows() > 0 && cols() > 0)
for (Index i = 0; i < rows(); i++)
@@ -57,8 +57,8 @@ void CMatrixD::serializeFrom(mrpt::serialization::CArchive& in, uint8_t version)
void CMatrixD::serializeTo(mrpt::serialization::CSchemeArchiveBase& out) const
{
SCHEMA_SERIALIZE_DATATYPE_VERSION(1);
out["nrows"] = this->rows();
out["ncols"] = this->cols();
out["nrows"] = static_cast<uint32_t>(this->rows());
out["ncols"] = static_cast<uint32_t>(this->cols());
out["data"] = this->inMatlabFormat();
}
/** Serialize CSchemeArchiveBase derived object to CSerializable Object*/

0 comments on commit 8d76a65

Please sign in to comment.