Kaydet (Commit) e0704701 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Turns out that C++03 doesn't support use of static double inside template.

static int works, however.  C++11 solves this via constexpr keyword.

Change-Id: I86f913129cbc65639ec2bf4b23843a5b25bd9146
üst d3629a39
...@@ -966,7 +966,7 @@ namespace { ...@@ -966,7 +966,7 @@ namespace {
struct SumOp struct SumOp
{ {
static const double initVal = 0.0; static const int InitVal = 0;
void operator() (double& rAccum, double fVal) void operator() (double& rAccum, double fVal)
{ {
...@@ -976,7 +976,7 @@ struct SumOp ...@@ -976,7 +976,7 @@ struct SumOp
struct SumSquareOp struct SumSquareOp
{ {
static const double initVal = 0.0; static const int InitVal = 0;
void operator() (double& rAccum, double fVal) void operator() (double& rAccum, double fVal)
{ {
...@@ -986,7 +986,7 @@ struct SumSquareOp ...@@ -986,7 +986,7 @@ struct SumSquareOp
struct ProductOp struct ProductOp
{ {
static const double initVal = 1.0; static const int InitVal = 1;
void operator() (double& rAccum, double fVal) void operator() (double& rAccum, double fVal)
{ {
...@@ -1003,7 +1003,7 @@ class WalkElementBlocks : std::unary_function<MatrixImplType::element_block_node ...@@ -1003,7 +1003,7 @@ class WalkElementBlocks : std::unary_function<MatrixImplType::element_block_node
bool mbFirst:1; bool mbFirst:1;
bool mbTextAsZero:1; bool mbTextAsZero:1;
public: public:
WalkElementBlocks(bool bTextAsZero) : maRes(0.0, _Op::initVal, 0), mbFirst(true), mbTextAsZero(bTextAsZero) {} WalkElementBlocks(bool bTextAsZero) : maRes(0.0, _Op::InitVal, 0), mbFirst(true), mbTextAsZero(bTextAsZero) {}
const ScMatrix::IterateResult& getResult() const { return maRes; } const ScMatrix::IterateResult& getResult() const { return maRes; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment