Commit 4e773581 authored by JINMEI Tatuya's avatar JINMEI Tatuya

changed the type of class constants from double to int so that they can be

initialized as part of the class definition.  we should rely on implicit type
conversion in this case so this change should be safe.

quite trivial so committing it to trunk directly, but I'll note it on the ML.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2672 e5f2f494-b856-4b98-b285-d166d9295462
parent 2648c604
......@@ -349,11 +349,19 @@ public:
}
public:
/// \brief A constant that indicates a failure in \c getAverageTime().
static const double TIME_FAILURE = -1;
///
/// This constant be used as double but is defined as int so that it can
/// be initialized within the class definition. Type conversion will be
/// performed implicitly.
static const int TIME_FAILURE = -1;
/// \brief A constant that indicates a failure in
/// \c getIterationPerSecond().
static const double ITERATION_FAILURE = -1;
///
/// This constant be used as double but is defined as int so that it can
/// be initialized within the class definition. Type conversion will be
/// performed implicitly.
static const int ITERATION_FAILURE = -1;
private:
void initialize(const bool immediate) {
if (immediate) {
......
......@@ -60,7 +60,7 @@ BenchMark<TestBenchMark>::tearDown() {
// XXX: some compilers cannot find class static constants used in
// EXPECT_xxx macross, for which we need an explicit definition.
template <typename T>
const double BenchMark<T>::TIME_FAILURE;
const int BenchMark<T>::TIME_FAILURE;
}
}
......
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