Skip to content

Commit 3ed7898

Browse files
committed
Apply std::enable_if on return type
1 parent 6cc2d8d commit 3ed7898

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

programs/sceneReconstruction/KinectFusionImpl.hpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,16 @@ class KinectFusionImpl : public KinectFusion
9292
cv::Ptr<T> handle;
9393
};
9494

95-
template <typename T, std::enable_if_t<std::is_integral<T>::value, bool> = true>
96-
inline T getValue(const yarp::os::Value & v)
95+
template <typename T>
96+
inline std::enable_if_t<std::is_integral<T>::value, T>
97+
getValue(const yarp::os::Value & v)
9798
{
9899
return v.asInt32();
99100
}
100101

101-
template <typename T, std::enable_if_t<std::is_floating_point<T>::value, bool> = true>
102-
inline T getValue(const yarp::os::Value & v)
102+
template <typename T>
103+
inline std::enable_if_t<std::is_floating_point<T>::value, T>
104+
getValue(const yarp::os::Value & v)
103105
{
104106
return v.asFloat32();
105107
}

0 commit comments

Comments
 (0)