From b899c6f55e44a88b829d98bfce2066c2469149ff Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Mon, 26 Oct 2015 07:33:45 +0100 Subject: [PATCH] Replaced a few int with size_t to fix 64 bit warnings. --- Layer.cpp | 2 +- Layer.h | 2 +- Neuron.cpp | 2 +- Neuron.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Layer.cpp b/Layer.cpp index 28fb630..4b14db9 100644 --- a/Layer.cpp +++ b/Layer.cpp @@ -30,7 +30,7 @@ void Layer::feedForward(const Layer &inputLayer) } } -double Layer::getWeightedSum(int outputNeuron) const +double Layer::getWeightedSum(size_t outputNeuron) const { double sum = 0.0; diff --git a/Layer.h b/Layer.h index 1290a58..94bab0e 100644 --- a/Layer.h +++ b/Layer.h @@ -14,7 +14,7 @@ public: void setOutputValues(const std::vector & outputValues); void feedForward(const Layer &inputLayer); - double getWeightedSum(int outputNeuron) const; + double getWeightedSum(size_t outputNeuron) const; void connectTo(const Layer & nextLayer); void updateInputWeights(Layer &prevLayer); diff --git a/Neuron.cpp b/Neuron.cpp index aa180bf..afa6a5e 100644 --- a/Neuron.cpp +++ b/Neuron.cpp @@ -30,7 +30,7 @@ void Neuron::feedForward(double inputValue) outputValue = transferFunction(inputValue); } -double Neuron::getWeightedOutputValue(unsigned int outputNeuron) const +double Neuron::getWeightedOutputValue(size_t outputNeuron) const { if (outputNeuron < outputWeights.size()) { diff --git a/Neuron.h b/Neuron.h index 8dcb5d7..20b1684 100644 --- a/Neuron.h +++ b/Neuron.h @@ -17,7 +17,7 @@ public: void setOutputValue(double value); void feedForward(double inputValue); - double getWeightedOutputValue(unsigned int outputNeuron) const; + double getWeightedOutputValue(size_t outputNeuron) const; void createRandomOutputWeights(size_t numberOfWeights); void createOutputWeights(std::list weights);