From 2ed3f8a7b6c4000f52546b0b4b4378a74edf517f Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 17 Jun 2014 15:18:21 +0200 Subject: binsearch_closest: Use C++ style casting --- binsearch_closest/binsearch_closest.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binsearch_closest/binsearch_closest.hpp b/binsearch_closest/binsearch_closest.hpp index 3db703f..b8a7004 100644 --- a/binsearch_closest/binsearch_closest.hpp +++ b/binsearch_closest/binsearch_closest.hpp @@ -58,7 +58,7 @@ ssize_t binsearch_closest(const std::vector vec, T val) if (imax - imin == 1 && std::abs(vec.at(imax) - val) < std::abs(vec.at(imin) - val)) imin = imax; - return (ssize_t)imin; + return static_cast(imin); } #endif /* __BINSEARCH_CLOSEST_HPP__ */ -- cgit v1.2.3-54-g00ecf