aboutsummaryrefslogtreecommitdiffhomepage
path: root/tvmet-1.7.1/include/tvmet/xpr/UnOperator.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/xpr/UnOperator.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/xpr/UnOperator.h')
-rw-r--r--tvmet-1.7.1/include/tvmet/xpr/UnOperator.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tvmet-1.7.1/include/tvmet/xpr/UnOperator.h b/tvmet-1.7.1/include/tvmet/xpr/UnOperator.h
index a6b50ee06..3c4b87f49 100644
--- a/tvmet-1.7.1/include/tvmet/xpr/UnOperator.h
+++ b/tvmet-1.7.1/include/tvmet/xpr/UnOperator.h
@@ -64,17 +64,17 @@ public:
#endif
/** Index operator, evaluates the expression inside. */
- value_type operator()(std::size_t i) const {
+ value_type operator()(int i) const {
return UnOp::apply_on(m_expr(i));
}
/** index operator for arrays/matrices. */
- value_type operator()(std::size_t i, std::size_t j) const {
+ value_type operator()(int i, int j) const {
return UnOp::apply_on(m_expr(i, j));
}
public: // debugging Xpr parse tree
- void print_xpr(std::ostream& os, std::size_t l=0) const {
+ void print_xpr(std::ostream& os, int l=0) const {
os << IndentLevel(l++)
<< "XprUnOp[O="<< ops << ", (O=" << ops_expr << ")]<"
<< std::endl;