diff --git a/esvg/Base.cpp b/esvg/Base.cpp index 87b20ac..e2132d9 100644 --- a/esvg/Base.cpp +++ b/esvg/Base.cpp @@ -38,8 +38,7 @@ void esvg::Base::parseTransform(exml::Element* _element) { double matrix[6]; float angle, xxx, yyy; int32_t n; - etk::Char myData = inputString.c_str(); - const char * pointerOnData = myData; + const char * pointerOnData = inputString.c_str(); while (*pointerOnData) { if (sscanf(pointerOnData, "matrix (%lf %lf %lf %lf %lf %lf) %n", &matrix[0], &matrix[1], &matrix[2], &matrix[3], &matrix[4], &matrix[5], &n) == 6) { m_transformMatrix.load_from(matrix); @@ -119,7 +118,7 @@ void esvg::Base::parsePosition(const exml::Element *_element, etk::Vector2D='0' && _dataInput[iii]<='9') @@ -128,7 +127,7 @@ float esvg::Base::parseLength(const std::string& _dataInput) { || _dataInput[iii]<='.') { continue; } - unit = _dataInput.extract(iii-1); + unit = std::string(_dataInput, iii-1); } //SVG_INFO(" == > ?? = " << n ); float font_size = 20.0f; diff --git a/esvg/Path.cpp b/esvg/Path.cpp index 2583d32..3c9392a 100644 --- a/esvg/Path.cpp +++ b/esvg/Path.cpp @@ -34,7 +34,10 @@ const char * extractCmd(const char* _input, char& _cmd, std::vector& _out _outputList.clear(); _cmd = '\0'; const char * outputPointer = NULL; - if (!( (_input[0] <= 'Z' && _input[0] >= 'A') || (_input[0] <= 'z' && _input[0] >= 'a') ) ) { + if (!( ( _input[0] <= 'Z' + && _input[0] >= 'A') + || ( _input[0] <= 'z' + && _input[0] >= 'a') ) ) { SVG_ERROR("Error in the SVG Path : \"" << _input << "\""); return NULL; } @@ -83,8 +86,7 @@ bool esvg::Path::parse(exml::Element * _element, agg::trans_affine& _parentTrans char command; std::vector listDot; - etk::Char plop = elementXML1.c_str(); - const char* elementXML = plop; + const char* elementXML = elementXML1.c_str(); for( const char *sss=extractCmd(elementXML, command, listDot); NULL != sss; diff --git a/esvg/Polygon.cpp b/esvg/Polygon.cpp index 628d3e7..8c49f0d 100644 --- a/esvg/Polygon.cpp +++ b/esvg/Polygon.cpp @@ -41,8 +41,7 @@ bool esvg::Polygon::parse(exml::Element * _element, agg::trans_affine& _parentTr SVG_ERROR("(l "/*<<_element->Pos()*/<<") polygon: missing points attribute"); return false; } - etk::Char sss2 = sss1.c_str(); - const char * sss = sss2; + const char * sss = sss1.c_str(); _sizeMax.setValue(0,0); SVG_VERBOSE("Parse polygon : \"" << sss << "\""); while ('\0' != sss[0]) { diff --git a/esvg/Polyline.cpp b/esvg/Polyline.cpp index 063911a..50a46e5 100644 --- a/esvg/Polyline.cpp +++ b/esvg/Polyline.cpp @@ -38,8 +38,7 @@ bool esvg::Polyline::parse(exml::Element * _element, agg::trans_affine& _parentT } _sizeMax.setValue(0,0); SVG_VERBOSE("Parse polyline : \"" << sss1 << "\""); - etk::Char sss2 = sss1.c_str(); - const char* sss = sss2; + const char* sss = sss1.c_str(); while ('\0' != sss[0]) { etk::Vector2D pos; int32_t n; diff --git a/esvg/esvg.cpp b/esvg/esvg.cpp index 55df61c..e6b7c3a 100644 --- a/esvg/esvg.cpp +++ b/esvg/esvg.cpp @@ -35,7 +35,8 @@ #define __class__ "Document" -esvg::Document::Document(const std::string& _fileName) : m_renderedElement(NULL) { +esvg::Document::Document(const std::string& _fileName) : + m_renderedElement(NULL) { m_fileName = _fileName; m_version = "0.0"; m_loadOK = true; @@ -62,7 +63,7 @@ esvg::Document::Document(const std::string& _fileName) : m_renderedElement(NULL) return; } - exml::Element* root = (exml::Element*)doc.getNamed( "svg" ); + exml::Element* root = (exml::Element*)doc.getNamed("svg" ); if (NULL == root ) { SVG_ERROR("(l ?) main node not find: \"svg\" in \"" << m_fileName << "\""); m_loadOK = false;