aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-12-17 16:04:21 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-12-17 16:04:21 +0000
commite3a8431a4aae2f332504627c149f5474b40a974b (patch)
tree809aaf2a435b04b0216f0ca882cc5d3291275722 /Eigen
parent89f468671dea2cc1dc37cdf75bbc7c7e56749bac (diff)
found one bug in the previous ++ changes
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/CommaInitializer.h8
-rw-r--r--Eigen/src/Core/MathFunctions.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Core/CommaInitializer.h b/Eigen/src/Core/CommaInitializer.h
index 178f5ea0f..ed28e0ca3 100644
--- a/Eigen/src/Core/CommaInitializer.h
+++ b/Eigen/src/Core/CommaInitializer.h
@@ -27,13 +27,13 @@
#define EIGEN_COMMAINITIALIZER_H
/** \class CommaInitializer
- *
+ *
* \brief Helper class used by the comma initializer operator
*
* This class is internally used to implement the comma initializer feature. It is
* the return type of MatrixBase::operator<<, and most of the time this is the only
* way it is used.
- *
+ *
* \sa \ref MatrixBaseCommaInitRef "MatrixBase::operator<<", CommaInitializer::finished()
*/
template<typename MatrixType>
@@ -67,7 +67,7 @@ struct CommaInitializer
ei_assert(m_col<m_matrix.cols()
&& "Too many coefficients passed to comma initializer (operator<<)");
ei_assert(m_currentBlockRows==1);
- m_matrix.coeffRef(m_row, ++m_col) = s;
+ m_matrix.coeffRef(m_row, m_col++) = s;
return *this;
}
@@ -128,7 +128,7 @@ struct CommaInitializer
*
* Example: \include MatrixBase_set.cpp
* Output: \verbinclude MatrixBase_set.out
- *
+ *
* \sa CommaInitializer::finished(), class CommaInitializer
*/
template<typename Derived>
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h
index e54618bf0..42efba341 100644
--- a/Eigen/src/Core/MathFunctions.h
+++ b/Eigen/src/Core/MathFunctions.h
@@ -101,7 +101,7 @@ template<> inline float ei_random(float a, float b)
int i;
do { i = ei_random<int>(256*int(a),256*int(b));
} while(i==0);
- return i/256.f;
+ return float(i)/256.f;
#else
return a + (b-a) * float(std::rand()) / float(RAND_MAX);
#endif