Skip to content
This repository has been archived by the owner on Oct 26, 2018. It is now read-only.

Commit

Permalink
Removed MSVC warnings
Browse files Browse the repository at this point in the history
These are warnings which show up when using Ceres.

Change-Id: Id1f382f46b8a60743f0b12535b5b3cdf46f988e0
  • Loading branch information
bjornpiltz committed May 7, 2014
1 parent eca7e1c commit 1df2f0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/ceres/fpclassify.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ namespace ceres {

#if defined(_MSC_VER)

inline bool IsFinite (double x) { return _finite(x); }
inline bool IsInfinite(double x) { return !_finite(x) && !_isnan(x); }
inline bool IsNaN (double x) { return _isnan(x); }
inline bool IsFinite (double x) { return _finite(x) != 0; }
inline bool IsInfinite(double x) { return _finite(x) == 0 && _isnan(x) == 0; }
inline bool IsNaN (double x) { return _isnan(x) != 0; }
inline bool IsNormal (double x) {
int classification = _fpclass(x);
return classification == _FPCLASS_NN ||
Expand Down
2 changes: 1 addition & 1 deletion include/ceres/local_parameterization.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class CERES_EXPORT SubsetParameterization : public LocalParameterization {
double* x_plus_delta) const;
virtual bool ComputeJacobian(const double* x,
double* jacobian) const;
virtual int GlobalSize() const { return constancy_mask_.size(); }
virtual int GlobalSize() const { return static_cast<int>(constancy_mask_.size()); }
virtual int LocalSize() const { return local_size_; }

private:
Expand Down

0 comments on commit 1df2f0f

Please sign in to comment.