mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-05-10 09:23:30 +00:00
fix: std::numeric_limits -> sprout::numeric_limits
This commit is contained in:
parent
a954fd7d51
commit
5879c81996
2 changed files with 4 additions and 4 deletions
|
@ -140,7 +140,7 @@ namespace sprout {
|
||||||
result_type result = result_type(static_cast<base_result>(eng()) - eng.min()) * (
|
result_type result = result_type(static_cast<base_result>(eng()) - eng.min()) * (
|
||||||
result_type(1) / (
|
result_type(1) / (
|
||||||
result_type(eng.max() - eng.min()) + result_type(
|
result_type(eng.max() - eng.min()) + result_type(
|
||||||
std::numeric_limits<base_result>::is_integer ? 1 : 0
|
sprout::numeric_limits<base_result>::is_integer ? 1 : 0
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace sprout {
|
||||||
} else if (brange < range) {
|
} else if (brange < range) {
|
||||||
for(; ; ) {
|
for(; ; ) {
|
||||||
range_type limit = range_type();
|
range_type limit = range_type();
|
||||||
if (range == std::numeric_limits<range_type>::max()) {
|
if (range == sprout::numeric_limits<range_type>::max()) {
|
||||||
limit = range / (range_type(brange) + 1);
|
limit = range / (range_type(brange) + 1);
|
||||||
if (range % (range_type(brange) + 1) == range_type(brange)) {
|
if (range % (range_type(brange) + 1) == range_type(brange)) {
|
||||||
++limit;
|
++limit;
|
||||||
|
@ -75,7 +75,7 @@ namespace sprout {
|
||||||
static_cast<range_type>(range / mult),
|
static_cast<range_type>(range / mult),
|
||||||
std::true_type()
|
std::true_type()
|
||||||
);
|
);
|
||||||
if (std::numeric_limits<range_type>::max() / mult < result_increment) {
|
if (sprout::numeric_limits<range_type>::max() / mult < result_increment) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
result_increment *= mult;
|
result_increment *= mult;
|
||||||
|
@ -90,7 +90,7 @@ namespace sprout {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
base_unsigned bucket_size = base_unsigned();
|
base_unsigned bucket_size = base_unsigned();
|
||||||
if (brange == std::numeric_limits<base_unsigned>::max()) {
|
if (brange == sprout::numeric_limits<base_unsigned>::max()) {
|
||||||
bucket_size = brange / (static_cast<base_unsigned>(range) + 1);
|
bucket_size = brange / (static_cast<base_unsigned>(range) + 1);
|
||||||
if (brange % (static_cast<base_unsigned>(range) + 1) == static_cast<base_unsigned>(range)) {
|
if (brange % (static_cast<base_unsigned>(range) + 1) == static_cast<base_unsigned>(range)) {
|
||||||
++bucket_size;
|
++bucket_size;
|
||||||
|
|
Loading…
Add table
Reference in a new issue