Commit 79443cef authored by gsell's avatar gsell
Browse files

Merge branch '453-cleanup-make-optimizer-compile-with-wextra-and-werror' into 'master'

Resolve "cleanup: make optimizer compile with -Wextra and -Werror"

Closes #453

See merge request !268
parents 0bd62b10 83f21669
......@@ -32,7 +32,7 @@ class SocialNetworkGraph : public TopoDiscoveryStrategy_t {
public:
std::set<size_t> execute(size_t numMasters, size_t dimensions, size_t id,
int island_id) {
int /*island_id*/) {
numMasters_ = numMasters;
dim_ = dimensions;
......
......@@ -52,7 +52,7 @@ namespace client
}
template <typename T>
void operator()(T& x) const
void operator()(T& /*x*/) const
{
// no-op
}
......@@ -74,4 +74,4 @@ namespace client
};
}
#endif
\ No newline at end of file
#endif
......@@ -35,10 +35,10 @@ namespace client { namespace code_gen
}
bool operator()(ast::nil) { BOOST_ASSERT(0); return false; }
bool operator()(unsigned int x) { return true; }
bool operator()(double x) { return true; }
bool operator()(bool x) { return true; }
bool operator()(ast::quoted_string const &x) { return true; }
bool operator()(unsigned int /*x*/) { return true; }
bool operator()(double /*x*/) { return true; }
bool operator()(bool /*x*/) { return true; }
bool operator()(ast::quoted_string const & /*x*/) { return true; }
bool operator()(ast::operation const& x) {
if (!boost::apply_visitor(*this, x.operand_))
......@@ -97,4 +97,5 @@ namespace client { namespace code_gen
};
}}
#endif
\ No newline at end of file
#endif
......@@ -16,7 +16,7 @@
template <class T> struct BlendCrossover
{
void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2,
CmdArguments_t args) {
CmdArguments_t /*args*/) {
// BLX-0.5 performs better than BLX operators with any other \alpha
// value
......@@ -34,4 +34,5 @@ template <class T> struct BlendCrossover
ind2->genes_m[i] = (1 - gamma2) * ming + gamma2 * maxg;
}
}
};
\ No newline at end of file
};
......@@ -77,7 +77,7 @@ public:
/// serialization of structure
template<class Archive>
void serialize(Archive & ar, const unsigned int version) {
void serialize(Archive & ar, const unsigned int /*version*/) {
ar & genes_m;
ar & objectives_m;
ar & id_m;
......@@ -157,4 +157,5 @@ private:
constraints_t constraints_m;
};
#endif
\ No newline at end of file
#endif
......@@ -4,7 +4,7 @@
template <class T> struct NaiveOnePointCrossover
{
void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2,
CmdArguments_t args) {
CmdArguments_t /*args*/) {
typedef typename T::genes_t genes_t;
genes_t genes_ind2;
......
......@@ -5,7 +5,7 @@
template <class T> struct NaiveUniformCrossover
{
void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2,
CmdArguments_t args) {
CmdArguments_t /*args*/) {
Individual::genes_t genes_ind2 = ind2->genes_m;
......
......@@ -4,7 +4,7 @@
/// Mutate exactly one gene of an individual.
template <class T> struct OneBitMutation
{
void mutate(boost::shared_ptr<T> ind, CmdArguments_t args) {
void mutate(boost::shared_ptr<T> ind, CmdArguments_t /*args*/) {
int range = ind->genes_m.size();
int position = static_cast<int>((rand() / (RAND_MAX + 1.0)) * range);
......
......@@ -216,7 +216,7 @@ private:
protected:
void parseInputFile(functionDictionary_t known_expr_funcs, bool isOptimizationRun) {
void parseInputFile(functionDictionary_t /*known_expr_funcs*/, bool isOptimizationRun) {
try {
input_file_ = cmd_args_->getArg<std::string>("inputfile", true);
......@@ -679,4 +679,4 @@ protected:
};
#endif
\ No newline at end of file
#endif
......@@ -28,7 +28,7 @@ public:
pipeline_.push_back(component);
}
void unregisterComponent(std::string name) {
void unregisterComponent(std::string /*name*/) {
//TODO: set null @ idx
}
......
......@@ -53,7 +53,7 @@ typedef struct {
bool is_valid;
template<class Archive>
void serialize(Archive & ar, const unsigned int version) {
void serialize(Archive & ar, const unsigned int /*version*/) {
ar & type;
ar & value;
ar & is_valid;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment