[DEV] change idea std::u32string to std::string
This commit is contained in:
parent
32b1966f8d
commit
03efb06322
@ -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<floa
|
||||
*/
|
||||
float esvg::Base::parseLength(const std::string& _dataInput) {
|
||||
SVG_VERBOSE(" lenght : '" << _dataInput << "'");
|
||||
float n = _dataInput.toFloat();
|
||||
float n = stof(_dataInput);
|
||||
std::string unit;
|
||||
for (int32_t iii=0; iii<_dataInput.size(); iii++) {
|
||||
if( (_dataInput[iii]>='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;
|
||||
|
@ -34,7 +34,10 @@ const char * extractCmd(const char* _input, char& _cmd, std::vector<float>& _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<float> 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;
|
||||
|
@ -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]) {
|
||||
|
@ -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<float> pos;
|
||||
int32_t n;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user