mirror of
https://github.com/monero-project/monero.git
synced 2024-12-27 11:09:23 -05:00
cryptonote: fix get_unit for non default settings
Found by codacy.com
This commit is contained in:
parent
d4f50cb109
commit
5d9915ab9e
@ -883,7 +883,7 @@ namespace cryptonote
|
|||||||
{
|
{
|
||||||
if (decimal_point == (unsigned int)-1)
|
if (decimal_point == (unsigned int)-1)
|
||||||
decimal_point = default_decimal_point;
|
decimal_point = default_decimal_point;
|
||||||
switch (std::atomic_load(&default_decimal_point))
|
switch (decimal_point)
|
||||||
{
|
{
|
||||||
case 12:
|
case 12:
|
||||||
return "monero";
|
return "monero";
|
||||||
@ -896,7 +896,7 @@ namespace cryptonote
|
|||||||
case 0:
|
case 0:
|
||||||
return "piconero";
|
return "piconero";
|
||||||
default:
|
default:
|
||||||
ASSERT_MES_AND_THROW("Invalid decimal point specification: " << default_decimal_point);
|
ASSERT_MES_AND_THROW("Invalid decimal point specification: " << decimal_point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user