mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-10 04:33:59 +01:00
Add casts for unavoidable signed/unsigned comparisons
At these code sites, it is preferable to cast rather than change a variable's type.
This commit is contained in:
@@ -117,9 +117,9 @@ public:
|
||||
{
|
||||
unsigned long n = BN_get_word(this);
|
||||
if (!BN_is_negative(this))
|
||||
return (n > std::numeric_limits<int>::max() ? std::numeric_limits<int>::max() : n);
|
||||
return (n > (unsigned long)std::numeric_limits<int>::max() ? std::numeric_limits<int>::max() : n);
|
||||
else
|
||||
return (n > std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n);
|
||||
return (n > (unsigned long)std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n);
|
||||
}
|
||||
|
||||
void setint64(int64 n)
|
||||
|
||||
Reference in New Issue
Block a user