From ef126283eb62f376970baa11fc9b2b06f1582191 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 16 May 2011 04:37:03 +0200 Subject: [PATCH] add symbolic constant for "neutral" time. Note: it's rather arbitrary choosen, because any time grid can define its own origin. You must not assume that the origin of any time axis is located at Time::ZERO !! --- .../timeline/{basic-draw-strategy.cpp => draw-strategy.cpp} | 0 src/lib/time/lumitime.cpp | 1 + src/lib/time/timevalue.hpp | 1 + 3 files changed, 2 insertions(+) rename src/gui/widgets/timeline/{basic-draw-strategy.cpp => draw-strategy.cpp} (100%) diff --git a/src/gui/widgets/timeline/basic-draw-strategy.cpp b/src/gui/widgets/timeline/draw-strategy.cpp similarity index 100% rename from src/gui/widgets/timeline/basic-draw-strategy.cpp rename to src/gui/widgets/timeline/draw-strategy.cpp diff --git a/src/lib/time/lumitime.cpp b/src/lib/time/lumitime.cpp index cc40b26c7..de79b7f38 100644 --- a/src/lib/time/lumitime.cpp +++ b/src/lib/time/lumitime.cpp @@ -39,6 +39,7 @@ namespace time { /** @note the allowed time range is explicitly limited to help overflow protection */ const Time Time::MAX ( TimeValue::buildRaw_(+std::numeric_limits::max() / 30) ); const Time Time::MIN ( TimeValue::buildRaw_(-_raw(Time::MAX) ) ); + const Time Time::ZERO; /** convenience constructor to build an diff --git a/src/lib/time/timevalue.hpp b/src/lib/time/timevalue.hpp index 4087a9f5f..fcc287941 100644 --- a/src/lib/time/timevalue.hpp +++ b/src/lib/time/timevalue.hpp @@ -273,6 +273,7 @@ namespace time { public: static const Time MAX ; static const Time MIN ; + static const Time ZERO; explicit Time (TimeValue const& val =TimeValue(0))