mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Cleanup.
This commit is contained in:
14
src/dtoa.cpp
14
src/dtoa.cpp
@@ -1043,6 +1043,20 @@ namespace bx
|
||||
return hd.d;
|
||||
}
|
||||
|
||||
int32_t toString(char* _out, int32_t _max, bool _value)
|
||||
{
|
||||
StringView str(_value ? "true" : "false");
|
||||
strCopy(_out, _max, str);
|
||||
return str.getLength();
|
||||
}
|
||||
|
||||
bool fromString(bool* _out, const StringView& _str)
|
||||
{
|
||||
char ch = toLower(_str.getPtr()[0]);
|
||||
*_out = ch == 't' || ch == '1';
|
||||
return 0 != _str.getLength();
|
||||
}
|
||||
|
||||
bool fromString(float* _out, const StringView& _str)
|
||||
{
|
||||
double dbl;
|
||||
|
||||
Reference in New Issue
Block a user