mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
Leave away unnecessary trailing zeros in script numeric values for menus
This commit is contained in:
parent
4ed8016110
commit
9c5c34b0c8
@ -41,7 +41,11 @@ namespace menu
|
|||||||
if (firstToken.m_type == SimpleParserValueType::INTEGER)
|
if (firstToken.m_type == SimpleParserValueType::INTEGER)
|
||||||
return SimpleParserValue::String(firstToken.GetPos(), new std::string(std::to_string(firstToken.IntegerValue())));
|
return SimpleParserValue::String(firstToken.GetPos(), new std::string(std::to_string(firstToken.IntegerValue())));
|
||||||
if (firstToken.m_type == SimpleParserValueType::FLOATING_POINT)
|
if (firstToken.m_type == SimpleParserValueType::FLOATING_POINT)
|
||||||
return SimpleParserValue::String(firstToken.GetPos(), new std::string(std::to_string(firstToken.FloatingPointValue())));
|
{
|
||||||
|
std::ostringstream ss;
|
||||||
|
ss << std::noshowpoint << firstToken.FloatingPointValue();
|
||||||
|
return SimpleParserValue::String(firstToken.GetPos(), new std::string(ss.str()));
|
||||||
|
}
|
||||||
return SimpleParserValue::String(firstToken.GetPos(), new std::string(firstToken.StringValue()));
|
return SimpleParserValue::String(firstToken.GetPos(), new std::string(firstToken.StringValue()));
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user