From 1e7da409bb0a24531673dd7a08046b6b3cfb62b9 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 15 Aug 2011 00:11:12 +0200 Subject: [PATCH] Fix logic error uncovered by GCC 4.4 benefits of using a newer compiler, yay! Explanation: the Link<...> template combines various policy templates and exposes a set of functions, which can be bound as functor into an concrete time::Control instance. Actually, we need to mix in only the Mutation baseclass, because we just want to inherit the privilege to change time values, which are otherwise immutable. We don't need to mix in the Mutator template anymore (this was a leftover from an earlier design) --- src/lib/time/control-policy.hpp | 8 ++++---- src/lib/time/control.hpp | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/time/control-policy.hpp b/src/lib/time/control-policy.hpp index a941c3c96..7ffed6426 100644 --- a/src/lib/time/control-policy.hpp +++ b/src/lib/time/control-policy.hpp @@ -234,7 +234,7 @@ namespace mutation { */ template struct Link - : Mutator + : Mutation , Builder { @@ -255,15 +255,15 @@ namespace mutation { static TI mutateLength (TimeSpan& target, Duration const& change) { - Mutator::imposeChange (target.duration(), change); + imposeChange (target.duration(), change); return Builder::buildChangedValue(target); } static TimeSpan mutateTimeSpan (TimeSpan& target, TimeSpan const& change) { - Mutator::imposeChange (target.duration(), change.duration()); - Mutator::imposeChange (target,change.start()); + imposeChange (target.duration(), change.duration()); + imposeChange (target,change.start()); return Builder::buildChangedValue(target); } diff --git a/src/lib/time/control.hpp b/src/lib/time/control.hpp index cbac65d33..486097934 100644 --- a/src/lib/time/control.hpp +++ b/src/lib/time/control.hpp @@ -94,6 +94,8 @@ ** the change, which might or might not reflect the change value passed in. ** ** @todo include support for QuTimeSpan values ////////////////////TICKET #760 + ** + ** @see TimeControl_test ** */