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

fix coding-stype

This commit is contained in:
bolero-MURAKAMI 2012-10-06 00:58:56 +09:00
parent 2012838899
commit df3023db30
196 changed files with 2510 additions and 3945 deletions

View file

@ -10,7 +10,10 @@ namespace sprout {
//
// int_pow
//
template<typename IntType, int Base = 10, typename sprout::enabler_if<std::is_integral<IntType>::value>::type = sprout::enabler>
template<
typename IntType, int Base = 10,
typename sprout::enabler_if<std::is_integral<IntType>::value>::type = sprout::enabler
>
inline SPROUT_CONSTEXPR IntType
int_pow(int exponent) {
return exponent ? Base * sprout::detail::int_pow<IntType, Base>(exponent - 1)
@ -28,7 +31,10 @@ namespace sprout {
: 0
;
}
template<int Base = 10, typename IntType, typename sprout::enabler_if<std::is_integral<IntType>::value>::type = sprout::enabler>
template<
int Base = 10, typename IntType,
typename sprout::enabler_if<std::is_integral<IntType>::value>::type = sprout::enabler
>
inline SPROUT_CONSTEXPR int
int_digits(IntType val) {
return val ? 1 + sprout::detail::int_digits_impl<Base>(val / Base)
@ -39,7 +45,10 @@ namespace sprout {
//
// int_digit_at
//
template<int Base = 10, typename IntType, typename sprout::enabler_if<std::is_integral<IntType>::value>::type = sprout::enabler>
template<
int Base = 10, typename IntType,
typename sprout::enabler_if<std::is_integral<IntType>::value>::type = sprout::enabler
>
inline SPROUT_CONSTEXPR int
int_digit_at(IntType val, int digits) {
return val < 0 ? -((val / sprout::detail::int_pow<IntType, Base>(digits)) % Base)