mirror of
https://github.com/boostorg/random.git
synced 2026-07-21 13:33:46 +00:00
Merge pull request #153 from boostorg/int
Cast result to the proper result type
This commit is contained in:
@@ -120,7 +120,7 @@ T generate_uniform_int(
|
||||
if(mult * range_type(brange) == range - mult + 1) {
|
||||
// The destination range is an integer power of
|
||||
// the generator's range.
|
||||
return(result);
|
||||
return static_cast<result_type>(result);
|
||||
}
|
||||
|
||||
// Postcondition: mult <= range
|
||||
|
||||
Reference in New Issue
Block a user