1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

support for VC++2015

This commit is contained in:
bolero-MURAKAMI 2015-12-09 19:54:35 +09:00
parent f2c09dd3af
commit b9440c0e9c
33 changed files with 353 additions and 253 deletions

View file

@ -54,9 +54,11 @@ namespace sprout {
* Get 'n'th byte from 'val'
*/
template<typename T>
inline SPROUT_CONSTEXPR T
inline SPROUT_CONSTEXPR std::uint_fast8_t
byte_at(T val, std::uint_fast8_t n) {
return sprout::net::detail::rshift_by((val & sprout::net::detail::mask_at<T>(n)), n);
return static_cast<std::uint_fast8_t>(
sprout::net::detail::rshift_by((val & sprout::net::detail::mask_at<T>(n)), n)
);
}
/*
@ -96,7 +98,7 @@ namespace sprout {
template<typename T>
inline SPROUT_CONSTEXPR T
reverse_impl(T val, std::uint_fast8_t n1, std::uint_fast8_t n2) {
return n1 > n2 ? val : sprout::net::detail::reverse_impl(swap(val, n1, n2), n1 + 1, n2 - 1);
return n1 > n2 ? val : sprout::net::detail::reverse_impl(sprout::net::detail::swap(val, n1, n2), n1 + 1, n2 - 1);
}
/*