Increase default padding to 1 in GetClampedCoords to avoid overflow msg.
This commit is contained in:
parent
9a5df73060
commit
36ee9f72e2
|
@ -145,7 +145,7 @@ VECTOR2<T> GetVectorSnapped45( const VECTOR2<T>& aVec, bool only45 = false )
|
||||||
*/
|
*/
|
||||||
template <typename in_type, typename ret_type = in_type, typename pad_type = unsigned int,
|
template <typename in_type, typename ret_type = in_type, typename pad_type = unsigned int,
|
||||||
typename = typename std::enable_if<std::is_unsigned<pad_type>::value>::type>
|
typename = typename std::enable_if<std::is_unsigned<pad_type>::value>::type>
|
||||||
VECTOR2<ret_type> GetClampedCoords( const VECTOR2<in_type>& aCoords, pad_type aPadding = 0u )
|
VECTOR2<ret_type> GetClampedCoords( const VECTOR2<in_type>& aCoords, pad_type aPadding = 1u )
|
||||||
{
|
{
|
||||||
typedef std::numeric_limits<int> coord_limits;
|
typedef std::numeric_limits<int> coord_limits;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue