aboutsummaryrefslogtreecommitdiffhomepage
path: root/tvmet-1.7.1/include/tvmet/MatrixEval.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2007-06-01 07:56:24 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2007-06-01 07:56:24 +0000
commit6d749c172a2f8f4dd5ec342356553f0b70018f74 (patch)
tree381948895c40256b7283b98eda55913a3352cfe2 /tvmet-1.7.1/include/tvmet/MatrixEval.h
parent887ff84376ffb5aae81bdf56cb27fca6ffd606eb (diff)
replace size_t with int everywhere.
The size_t type means a number of _bytes_, and it was misused as counting e.g. the number of rows/columns in a matrix. Moreover, it is unsigned, which can give strange bugs if a signed/unsigned mismatch occurs.
Diffstat (limited to 'tvmet-1.7.1/include/tvmet/MatrixEval.h')
-rw-r--r--tvmet-1.7.1/include/tvmet/MatrixEval.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/tvmet-1.7.1/include/tvmet/MatrixEval.h b/tvmet-1.7.1/include/tvmet/MatrixEval.h
index c4d13f9f6..d8e71509b 100644
--- a/tvmet-1.7.1/include/tvmet/MatrixEval.h
+++ b/tvmet-1.7.1/include/tvmet/MatrixEval.h
@@ -42,7 +42,7 @@ namespace tvmet {
* \endcode
* \sa \ref compare
*/
-template<class E, std::size_t Rows, std::size_t Cols>
+template<class E, int Rows, int Cols>
inline
bool all_elements(const XprMatrix<E, Rows, Cols>& e) {
return meta::Matrix<Rows, Cols, 0, 0>::all_elements(e);
@@ -64,7 +64,7 @@ bool all_elements(const XprMatrix<E, Rows, Cols>& e) {
* \endcode
* \sa \ref compare
*/
-template<class E, std::size_t Rows, std::size_t Cols>
+template<class E, int Rows, int Cols>
inline
bool any_elements(const XprMatrix<E, Rows, Cols>& e) {
return meta::Matrix<Rows, Cols, 0, 0>::any_elements(e);
@@ -87,7 +87,7 @@ bool any_elements(const XprMatrix<E, Rows, Cols>& e) {
* This eval is for the a?b:c syntax, since it's not allowed to overload
* these operators.
*/
-template<class E1, class T2, class T3, std::size_t Rows, std::size_t Cols>
+template<class E1, class T2, class T3, int Rows, int Cols>
inline
XprMatrix<
XprEval<
@@ -117,7 +117,7 @@ eval(const XprMatrix<E1, Rows, Cols>& e1,
* This eval is for the a?b:c syntax, since it's not allowed to overload
* these operators.
*/
-template<class E1, class T2, class E3, std::size_t Rows, std::size_t Cols>
+template<class E1, class T2, class E3, int Rows, int Cols>
inline
XprMatrix<
XprEval<
@@ -147,7 +147,7 @@ eval(const XprMatrix<E1, Rows, Cols>& e1,
* This eval is for the a?b:c syntax, since it's not allowed to overload
* these operators.
*/
-template<class E1, class E2, class T3, std::size_t Rows, std::size_t Cols>
+template<class E1, class E2, class T3, int Rows, int Cols>
inline
XprMatrix<
XprEval<
@@ -177,7 +177,7 @@ eval(const XprMatrix<E1, Rows, Cols>& e1,
* This eval is for the a?b:c syntax, since it's not allowed to overload
* these operators.
*/
-template<class E1, class E2, class E3, std::size_t Rows, std::size_t Cols>
+template<class E1, class E2, class E3, int Rows, int Cols>
inline
XprMatrix<
XprEval<
@@ -207,7 +207,7 @@ eval(const XprMatrix<E1, Rows, Cols>& e1,
* XprMatrix<E1, Rows, Cols> ? XprMatrix<E2, Rows, Cols> : POD
*/
#define TVMET_IMPLEMENT_MACRO(POD) \
-template<class E, std::size_t Rows, std::size_t Cols> \
+template<class E, int Rows, int Cols> \
inline \
XprMatrix< \
XprEval< \
@@ -227,7 +227,7 @@ eval(const XprMatrix<E, Rows, Cols>& e, POD x2, POD x3) { \
expr_type(e, XprLiteral< POD >(x2), XprLiteral< POD >(x3))); \
} \
\
-template<class E1, class E3, std::size_t Rows, std::size_t Cols> \
+template<class E1, class E3, int Rows, int Cols> \
inline \
XprMatrix< \
XprEval< \
@@ -247,7 +247,7 @@ eval(const XprMatrix<E1, Rows, Cols>& e1, POD x2, const XprMatrix<E3, Rows, Cols
expr_type(e1, XprLiteral< POD >(x2), e3)); \
} \
\
-template<class E1, class E2, std::size_t Rows, std::size_t Cols> \
+template<class E1, class E2, int Rows, int Cols> \
inline \
XprMatrix< \
XprEval< \
@@ -299,7 +299,7 @@ TVMET_IMPLEMENT_MACRO(long double)
* This eval is for the a?b:c syntax, since it's not allowed to overload
* these operators.
*/
-template<class E, std::size_t Rows, std::size_t Cols, class T>
+template<class E, int Rows, int Cols, class T>
inline
XprMatrix<
XprEval<
@@ -327,7 +327,7 @@ eval(const XprMatrix<E, Rows, Cols>& e, const std::complex<T>& x2, const std::co
* This eval is for the a?b:c syntax, since it's not allowed to overload
* these operators.
*/
-template<class E1, class E3, std::size_t Rows, std::size_t Cols, class T>
+template<class E1, class E3, int Rows, int Cols, class T>
inline
XprMatrix<
XprEval<
@@ -355,7 +355,7 @@ eval(const XprMatrix<E1, Rows, Cols>& e1, const std::complex<T>& x2, const XprMa
* This eval is for the a?b:c syntax, since it's not allowed to overload
* these operators.
*/
-template<class E1, class E2, std::size_t Rows, std::size_t Cols, class T>
+template<class E1, class E2, int Rows, int Cols, class T>
inline
XprMatrix<
XprEval<