Skip to content

Commit

Permalink
Const and cosmetic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed Oct 7, 2017
1 parent 0813c7a commit 37f9e3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/software/Geodesy/registration_to_exif_gps_position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ int main(int argc, char **argv)
std::cout << "\nFound: " << vec_fitting_errors.size() << " inliers"
<< " from " << X_SfM.cols() << " points." << std::endl;
std::cout << "\n3D Similarity fitting error using only the fitted inliers (in target coordinate system units):";
minMaxMeanMedian<float>( vec_fitting_errors.begin(), vec_fitting_errors.end() );
minMaxMeanMedian<float>( vec_fitting_errors.cbegin(), vec_fitting_errors.cend() );
}
}
break;
Expand Down
6 changes: 4 additions & 2 deletions src/third_party/histogram/histogram.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,17 @@ class Histogram
std::string ToString(const std::string & sTitle = "") const
{
std::ostringstream os;
os << std::endl << sTitle << std::endl;
if (!sTitle.empty())
os << "\n" << sTitle << "\n";
const size_t n = freq.size();
for (size_t i = 0; i < n; ++i)
{
os << std::setprecision(3)
<< static_cast<float>(End-Start)/n*static_cast<float>(i)
<< "\t|\t" << freq[i] << "\n";
}
os << std::setprecision(3) << End << std::endl;
if (!freq.empty())
os << std::setprecision(3) << End << "\n";
return os.str();
}

Expand Down

0 comments on commit 37f9e3e

Please sign in to comment.