fix warnings on Windows. No need to create variable in catch statement if you're not going to use it. It generates unreferenced variable warnings.

release/4.3a0
Chris Beall 2014-06-01 11:30:04 -04:00
parent 351e9ace72
commit 470527ff99
4 changed files with 5 additions and 5 deletions

View File

@ -244,7 +244,7 @@ void LevenbergMarquardtOptimizer::iterate() {
try {
delta = solve(dampedSystem, state_.values, params_);
systemSolvedSuccessfully = true;
} catch (IndeterminantLinearSystemException& e) {
} catch (IndeterminantLinearSystemException) {
systemSolvedSuccessfully = false;
}

View File

@ -325,7 +325,7 @@ public:
const Cameras& cameras, const Point3& point,
const double lambda = 0.0) const {
int numKeys = this->keys_.size();
size_t numKeys = this->keys_.size();
std::vector<KeyMatrix2D> Fblocks;
double f = computeJacobians(Fblocks, E, PointCov, b, cameras, point,
lambda);
@ -352,7 +352,7 @@ public:
Eigen::JacobiSVD<Matrix> svd(E, Eigen::ComputeFullU);
Vector s = svd.singularValues();
// Enull = zeros(2 * numKeys, 2 * numKeys - 3);
int numKeys = this->keys_.size();
size_t numKeys = this->keys_.size();
Enull = svd.matrixU().block(0, 3, 2 * numKeys, 2 * numKeys - 3); // last 2m-3 columns
return f;

View File

@ -262,7 +262,7 @@ public:
try {
Point2 reprojectionError(camera.project(point_) - zi);
totalReprojError += reprojectionError.vector().norm();
} catch (CheiralityException& e) {
} catch (CheiralityException) {
cheiralityException_ = true;
}
i += 1;

View File

@ -28,7 +28,7 @@ void FileWriter::emit(bool add_header, bool force_overwrite) const {
bool file_exists = true;
try {
existing_contents = file_contents(filename_.c_str(), add_header);
} catch (CantOpenFile& e) {
} catch (CantOpenFile) {
file_exists = false;
}