From d1903b364d47c78bf1a8220e15986f36969155b3 Mon Sep 17 00:00:00 2001 From: Jeroen Vlek Date: Thu, 28 Feb 2013 23:35:20 +0100 Subject: [PATCH] Fixed compiler warnings --- Image.cpp | 4 ++-- ImageCompare.cpp | 2 +- ImageImp.cpp | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Image.cpp b/Image.cpp index 390710b..05b8e65 100644 --- a/Image.cpp +++ b/Image.cpp @@ -52,9 +52,9 @@ const RGBA32* Image::get(unsigned int x, unsigned int y) return _imp->get(x,y); } -void Image::drawGene(const Gene& gene) +void Image::drawGene(const Gene&) { - std::cout << "[ Image::drawGene() ] Only PhenotypeImage draw gene" << std::endl; + std::cout << "[ Image::drawGene() ] Only PhenotypeImage draws gene" << std::endl; } ImageImp& Image::getImageImp() diff --git a/ImageCompare.cpp b/ImageCompare.cpp index b9c2922..d0b645d 100644 --- a/ImageCompare.cpp +++ b/ImageCompare.cpp @@ -28,7 +28,7 @@ double ImageCompare::compare(Image& a, Image& b) // first rough implementation: compute average Euclidean distance between pixels double avgDistance = 0.0; - unsigned int totalPixels; + unsigned int totalPixels = 0; for(unsigned int x = 0; x < a.getWidth(); ++x) { for(unsigned int y = 0; y < a.getHeight(); ++y) { const RGBA32* pixelA = a.get(x, y); diff --git a/ImageImp.cpp b/ImageImp.cpp index 1fd7da8..534ae3e 100644 --- a/ImageImp.cpp +++ b/ImageImp.cpp @@ -17,6 +17,5 @@ ImageImp::~ImageImp() { } -ImageImp::ImageImp(const unsigned int width, const unsigned int height) -{ +ImageImp::ImageImp(const unsigned int, const unsigned int ){ }