Fix location bug for real values (',' can be used instead of '.')
This commit is contained in:
parent
00be31a318
commit
114ef1c5d1
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "uPDFTypes.h"
|
||||
#include "uPDFParser_common.h"
|
||||
|
@ -54,11 +55,15 @@ namespace uPDFParser
|
|||
|
||||
std::string Real::str()
|
||||
{
|
||||
std::string res;
|
||||
std::string sign("");
|
||||
if (_signed && _value >= 0)
|
||||
sign = "+";
|
||||
|
||||
return " " + sign + std::to_string(_value);
|
||||
res = " " + sign + std::to_string(_value);
|
||||
std::replace( res.begin(), res.end(), ',', '.');
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
std::string Array::str()
|
||||
|
|
Loading…
Reference in New Issue
Block a user