From 53e2f04072d64d4282bc542081312b545546837f Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 13 Aug 2014 22:30:47 +0200 Subject: [PATCH] [DEV] change default Instance --- ejson/Number.cpp | 6 +++--- ejson/ejson.cpp | 2 +- ejson/test.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ejson/Number.cpp b/ejson/Number.cpp index e5a631b..42ee8a6 100644 --- a/ejson/Number.cpp +++ b/ejson/Number.cpp @@ -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; } diff --git a/ejson/ejson.cpp b/ejson/ejson.cpp index 750c68b..36de6fa 100644 --- a/ejson/ejson.cpp +++ b/ejson/ejson.cpp @@ -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(); diff --git a/ejson/test.cpp b/ejson/test.cpp index 2316e5a..fbac6f3 100644 --- a/ejson/test.cpp +++ b/ejson/test.cpp @@ -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 tmpout = std::split(out, '\n'); - std::vector tmpref = std::split(l_list[iii].m_ref, '\n'); + std::vector tmpout = etk::split(out, '\n'); + std::vector 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 = std::split(out, '\n'); - std::vector tmpref = std::split(l_list[iii].m_ref, '\n'); + std::vector tmpout = etk::split(out, '\n'); + std::vector 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