MCPcopy Create free account
hub / github.com/MyGUI/mygui / numberToString

Function numberToString

Plugins/Plugin_HikariWidget/FlashValue.cpp:47–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45
46template<class NumberType>
47inline std::string numberToString(const NumberType& number)
48{
49 std::ostringstream converter;
50
51 if (typeid(NumberType) == typeid(bool))
52 {
53 return number ? "true" : "false";
54 }
55
56 return (converter << number).fail() ? std::string{} : converter.str();
57}
58
59FlashValue::FlashValue() :
60 numValue(0),

Callers

nothing calls this directly

Calls 1

strMethod · 0.80

Tested by

no test coverage detected