Fixed warnings

release/4.3a0
Alex Cunningham 2012-10-06 21:41:08 +00:00
parent b60189104c
commit 5b7b89b57c
1 changed files with 3 additions and 3 deletions

View File

@ -287,7 +287,7 @@ public:
*/ */
Vector whitenedError(const Values& c) const { Vector whitenedError(const Values& c) const {
const Vector unwhitenedErrorVec = unwhitenedError(c); const Vector unwhitenedErrorVec = unwhitenedError(c);
if(unwhitenedErrorVec.size() != noiseModel_->dim()) if((size_t) unwhitenedErrorVec.size() != noiseModel_->dim())
throw std::invalid_argument("This factor was created with a NoiseModel of incorrect dimension."); throw std::invalid_argument("This factor was created with a NoiseModel of incorrect dimension.");
return noiseModel_->whiten(unwhitenedErrorVec); return noiseModel_->whiten(unwhitenedErrorVec);
} }
@ -301,7 +301,7 @@ public:
virtual double error(const Values& c) const { virtual double error(const Values& c) const {
if (this->active(c)) { if (this->active(c)) {
const Vector unwhitenedErrorVec = unwhitenedError(c); const Vector unwhitenedErrorVec = unwhitenedError(c);
if(unwhitenedErrorVec.size() != noiseModel_->dim()) if((size_t) unwhitenedErrorVec.size() != noiseModel_->dim())
throw std::invalid_argument("This factor was created with a NoiseModel of incorrect dimension."); throw std::invalid_argument("This factor was created with a NoiseModel of incorrect dimension.");
return 0.5 * noiseModel_->distance(unwhitenedErrorVec); return 0.5 * noiseModel_->distance(unwhitenedErrorVec);
} else { } else {
@ -324,7 +324,7 @@ public:
// Call evaluate error to get Jacobians and b vector // Call evaluate error to get Jacobians and b vector
std::vector<Matrix> A(this->size()); std::vector<Matrix> A(this->size());
b = -unwhitenedError(x, A); b = -unwhitenedError(x, A);
if(b.size() != noiseModel_->dim()) if((size_t) b.size() != noiseModel_->dim())
throw std::invalid_argument("This factor was created with a NoiseModel of incorrect dimension."); throw std::invalid_argument("This factor was created with a NoiseModel of incorrect dimension.");
this->noiseModel_->WhitenSystem(A,b); this->noiseModel_->WhitenSystem(A,b);