Commit 5d0ccdb5 authored by Martin Marinov's avatar Martin Marinov

Fix build errors related to Progress::TickNumber on Windows.

parent 85edb84d
......@@ -15,6 +15,13 @@
#ifdef PROGRESS_ON
namespace Progress {
IOutputStream& operator<<(IOutputStream& _os, const TickNumber _i)
{
static_assert(sizeof(TickNumber) == sizeof(size_t),
"These types should be equal size");
return _os.print((size_t)_i);
}
struct Context::LogData
{
typedef Base::OutputStreamAdaptT<std::ofstream> FileOutputStream;
......
......@@ -6,6 +6,7 @@
#ifdef PROGRESS_ON
#include <Base/Utils/Thread.hh>
#include <stdint.h>
namespace Base {
class IOutputStream;
......@@ -16,9 +17,13 @@ namespace Progress {
//! Progress stream type
typedef Base::IOutputStream IOutputStream;
//! Progress tick counter type
typedef unsigned long TickNumber;
typedef uint64_t TickNumber;
//! Streaming operator for TickNumber
IOutputStream& operator<<(IOutputStream& _os, const TickNumber _i);
/*!
The name of the progress log file, uses the .csv format.
......@@ -51,7 +56,7 @@ public:
Node(const char* const _name,
Node* _next = nullptr, Node* _chld = nullptr)
: name(_name), next_(_next), chld_(_chld), prnt_(nullptr),
done_chld_nmbr_(0), tick_nmbr_(0), time_ns_(0)
tick_nmbr_(0), done_chld_nmbr_(0), time_ns_(0)
{}
virtual ~Node();
......
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