From 71e3fbe25dadae00718842abad5429dea55b749a Mon Sep 17 00:00:00 2001 From: jboisson Date: Wed, 17 Dec 2008 17:35:43 +0000 Subject: [PATCH] Several modifications have been made to obtain g++ (GCC) 4.3.2 20081105 compatibility, -Wno-unused-parameter and -Wno-ignored-qualifiers have been added to avoid the corresponding warnings (only moeo is concerned by the second one). In order to avoid all the warnings, several modifications into EO are needed. git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1305 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/install.cmake | 2 +- .../src/comparator/moeoParetoObjectiveVectorComparator.h | 1 + .../src/fitness/moeoDominanceDepthFitnessAssignment.h | 2 +- trunk/paradiseo-moeo/src/metric/moeoHyperVolumeMetric.h | 5 +++-- trunk/paradiseo-peo/src/peoAsyncIslandMig.h | 3 ++- trunk/paradiseo-peo/test/t-Mpdallexit.cpp | 1 + trunk/paradiseo-peo/test/t-Mpdboot.cpp | 1 + 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/trunk/install.cmake b/trunk/install.cmake index 5ffd6d717..43ebf9209 100644 --- a/trunk/install.cmake +++ b/trunk/install.cmake @@ -70,7 +70,7 @@ IF(WIN32 AND NOT CYGWIN) ENDIF(CMAKE_CXX_COMPILER MATCHES cl) ELSE(WIN32 AND NOT CYGWIN) IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra") + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6") ENDIF(CMAKE_COMPILER_IS_GNUCXX) diff --git a/trunk/paradiseo-moeo/src/comparator/moeoParetoObjectiveVectorComparator.h b/trunk/paradiseo-moeo/src/comparator/moeoParetoObjectiveVectorComparator.h index fca1614f9..cfc9670e7 100644 --- a/trunk/paradiseo-moeo/src/comparator/moeoParetoObjectiveVectorComparator.h +++ b/trunk/paradiseo-moeo/src/comparator/moeoParetoObjectiveVectorComparator.h @@ -87,6 +87,7 @@ class moeoParetoObjectiveVectorComparator : public moeoObjectiveVectorComparator } } } + return dom; } diff --git a/trunk/paradiseo-moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h b/trunk/paradiseo-moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h index bd0193251..1ff4502d5 100644 --- a/trunk/paradiseo-moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h +++ b/trunk/paradiseo-moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h @@ -173,7 +173,7 @@ class moeoDominanceDepthFitnessAssignment : public moeoDominanceBasedFitnessAssi // assign fitness values unsigned int rank = 1; _pop[_pop.size()-1].fitness(rank); - for (unsigned int i=_pop.size()-2; i>=0; i--) + for (int i=((int)_pop.size())-2; i>=0; i--) { if (_pop[i].objectiveVector() != _pop[i+1].objectiveVector()) { diff --git a/trunk/paradiseo-moeo/src/metric/moeoHyperVolumeMetric.h b/trunk/paradiseo-moeo/src/metric/moeoHyperVolumeMetric.h index b9acaa419..dec9b69b0 100644 --- a/trunk/paradiseo-moeo/src/metric/moeoHyperVolumeMetric.h +++ b/trunk/paradiseo-moeo/src/metric/moeoHyperVolumeMetric.h @@ -341,10 +341,11 @@ class moeoHyperVolumeMetric : public moeoVectorUnaryMetric < ObjectiveVector , d double rho; + + ObjectiveVector ref_point; + /*vectors contains bounds for normalization*/ std::vector < eoRealInterval > bounds; - - ObjectiveVector ref_point; }; diff --git a/trunk/paradiseo-peo/src/peoAsyncIslandMig.h b/trunk/paradiseo-peo/src/peoAsyncIslandMig.h index b6a2278a1..f4a10e357 100644 --- a/trunk/paradiseo-peo/src/peoAsyncIslandMig.h +++ b/trunk/paradiseo-peo/src/peoAsyncIslandMig.h @@ -101,10 +101,11 @@ template< class TYPESELECT, class TYPEREPLACE > class peoAsyncIslandMig : public //! @param std :: queue< TYPEREPLACE > imm //! @param std :: queue< TYPESELECT > em //! @param std :: queue< Cooperative* > coop_em - continuator & cont; + selector & select; replacement & replace; Topology& topology; + continuator & cont; std :: queue< TYPEREPLACE > imm; std :: queue< TYPESELECT > em; std :: queue< Cooperative* > coop_em; diff --git a/trunk/paradiseo-peo/test/t-Mpdallexit.cpp b/trunk/paradiseo-peo/test/t-Mpdallexit.cpp index 57d4d66dd..6a9db0b3a 100644 --- a/trunk/paradiseo-peo/test/t-Mpdallexit.cpp +++ b/trunk/paradiseo-peo/test/t-Mpdallexit.cpp @@ -35,6 +35,7 @@ */ #include +#include int main (int __argc, char *__argv[]) { diff --git a/trunk/paradiseo-peo/test/t-Mpdboot.cpp b/trunk/paradiseo-peo/test/t-Mpdboot.cpp index 83b2637ac..094e899f2 100644 --- a/trunk/paradiseo-peo/test/t-Mpdboot.cpp +++ b/trunk/paradiseo-peo/test/t-Mpdboot.cpp @@ -35,6 +35,7 @@ */ #include +#include int main (int __argc, char *__argv[]) {