From 67e4bb01fd1a403e253ddf747e5c6a966450fbc1 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 13 Jun 2013 14:45:51 +0200 Subject: [PATCH] Use EOType as a ref to the template in stats --- eo/src/eoDualFitness.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index da70e760a..ff952db66 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -438,22 +438,24 @@ public: * the second one on the unfeasible ones, merge the two resulting value in * a string, separated by a given marker. */ -template -class eoDualStatSwitch : public eoStat< EOT, std::string > +template +class eoDualStatSwitch : public eoStat< typename EOSTAT::EOType, std::string > { +public: + typedef typename EOSTAT::EOType EOType; protected: EOSTAT & _stat_feasible; EOSTAT & _stat_unfeasible; std::string _sep; - eoDualPopSplit _pop_split; + eoDualPopSplit _pop_split; public: - using eoStat::value; + using eoStat::value; eoDualStatSwitch( EOSTAT & stat_feasible, EOSTAT & stat_unfeasible, std::string sep=" " ) : - eoStat( + eoStat( "?"+sep+"?", stat_feasible.longName()+sep+stat_unfeasible.longName() ), @@ -462,7 +464,7 @@ public: _sep(sep) { } - virtual void operator()( const eoPop & pop ) + virtual void operator()( const eoPop & pop ) { // create two separated pop in this operator _pop_split( pop );