cryptonote: fix get_unit for non default settings

Found by codacy.com
release-v0.14
moneromooo-monero 6 years ago
parent d4f50cb109
commit 5d9915ab9e
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

@ -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…
Cancel
Save