[DEV] change default Instance
This commit is contained in:
parent
d9c98697ed
commit
53e2f04072
@ -26,7 +26,7 @@ bool ejson::Number::iParse(const std::string& _data, size_t& _pos, ejson::filePo
|
||||
tmpVal+=_data[iii];
|
||||
} else {
|
||||
_pos = iii-1;
|
||||
m_value = std::stod(tmpVal);
|
||||
m_value = etk::string_to_double(tmpVal);
|
||||
JSON_PARSE_ELEMENT("end parse : 'Number' " << tmpVal << " >> " << m_value);
|
||||
return true;
|
||||
}
|
||||
@ -41,9 +41,9 @@ bool ejson::Number::iGenerate(std::string& _data, size_t _indent) const {
|
||||
// special thing to remove .000000 at the end of perfect number ...
|
||||
int64_t tmpVal = m_value;
|
||||
if ((double)tmpVal == m_value) {
|
||||
_data += std::to_string(tmpVal);
|
||||
_data += etk::to_string(tmpVal);
|
||||
} else {
|
||||
_data += std::to_string(m_value);
|
||||
_data += etk::to_string(m_value);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ void ejson::Document::displayError() {
|
||||
|
||||
void ejson::Document::createError(const std::string& _data, size_t _pos, const ejson::filePos& _filePos, const std::string& _comment) {
|
||||
m_comment = _comment;
|
||||
m_Line = extract_line(_data, _pos);
|
||||
m_Line = etk::extract_line(_data, _pos);
|
||||
m_filePos = _filePos;
|
||||
if (true == m_writeErrorWhenDetexted) {
|
||||
displayError();
|
||||
|
@ -518,8 +518,8 @@ int main(int argc, const char *argv[]) {
|
||||
JSON_INFO("[TEST] " << sectionID << ":" << jjj << " { OK } Result in error (normal case)");
|
||||
} else {
|
||||
JSON_ERROR("[TEST] " << sectionID << ":" << jjj << " {ERROR } different output");
|
||||
std::vector<std::string> tmpout = std::split(out, '\n');
|
||||
std::vector<std::string> tmpref = std::split(l_list[iii].m_ref, '\n');
|
||||
std::vector<std::string> tmpout = etk::split(out, '\n');
|
||||
std::vector<std::string> tmpref = etk::split(l_list[iii].m_ref, '\n');
|
||||
//JSON_ERROR("generate : \n" << out);
|
||||
//JSON_ERROR("reference : \n" << l_list[iii].m_ref);
|
||||
for (int32_t jjj=0; jjj<tmpout.size() || jjj<tmpref.size(); ++jjj) {
|
||||
@ -538,8 +538,8 @@ int main(int argc, const char *argv[]) {
|
||||
}
|
||||
if (l_list[iii].m_errorPos == 3) {
|
||||
JSON_ERROR("[TEST] " << sectionID << ":" << jjj << " {ERROR} checking result might be in error...");
|
||||
std::vector<std::string> tmpout = std::split(out, '\n');
|
||||
std::vector<std::string> tmpref = std::split(l_list[iii].m_ref, '\n');
|
||||
std::vector<std::string> tmpout = etk::split(out, '\n');
|
||||
std::vector<std::string> tmpref = etk::split(l_list[iii].m_ref, '\n');
|
||||
//JSON_ERROR("generate : \n" << out);
|
||||
//JSON_ERROR("reference : \n" << l_list[iii].m_ref);
|
||||
for (int32_t jjj=0; jjj<tmpout.size() || jjj<tmpref.size(); ++jjj) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user