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)
This commit is contained in:
Fischlurch 2011-08-15 00:11:12 +02:00
parent 4a62444ad4
commit 1e7da409bb
2 changed files with 6 additions and 4 deletions

View file

@ -234,7 +234,7 @@ namespace mutation {
*/
template<class TI, class TAR>
struct Link
: Mutator<TI>
: Mutation
, Builder<TI,TAR>
{
@ -255,15 +255,15 @@ namespace mutation {
static TI
mutateLength (TimeSpan& target, Duration const& change)
{
Mutator<TimeSpan>::imposeChange (target.duration(), change);
imposeChange (target.duration(), change);
return Builder<TI,TimeSpan>::buildChangedValue(target);
}
static TimeSpan
mutateTimeSpan (TimeSpan& target, TimeSpan const& change)
{
Mutator<TimeSpan>::imposeChange (target.duration(), change.duration());
Mutator<TimeSpan>::imposeChange (target,change.start());
imposeChange (target.duration(), change.duration());
imposeChange (target,change.start());
return Builder<TimeSpan,TimeSpan>::buildChangedValue(target);
}

View file

@ -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
**
*/