[DEV] correction of stl-port

This commit is contained in:
Edouard DUPIN 2013-11-13 21:52:12 +01:00
parent 4d02dd677e
commit c24b20b9d2
4 changed files with 11 additions and 11 deletions

View File

@ -47,7 +47,7 @@ bool exml::Attribute::iParse(const std::string& _data, int32_t& _pos, bool _case
break;
}
}
m_name = std::string(_data, _pos, lastElementName+1);
m_name = std::string(_data, _pos, lastElementName+1-(_pos));
if (true == _caseSensitive) {
m_name = to_lower(m_name);
}
@ -91,7 +91,7 @@ bool exml::Attribute::iParse(const std::string& _data, int32_t& _pos, bool _case
break;
}
}
m_value = std::string(_data, lastElementName+white+2, lastAttributePos);
m_value = std::string(_data, lastElementName+white+2, lastAttributePos-(lastElementName+white+2));
EXML_PARSE_ATTRIBUTE(m_pos << " attribute : " << m_name << "=\"" << m_value << "\"");
@ -110,7 +110,7 @@ bool exml::Attribute::iParse(const std::string& _data, int32_t& _pos, bool _case
break;
}
}
m_value = std::string(_data, lastElementName+white+3, lastAttributePos);
m_value = std::string(_data, lastElementName+white+3, lastAttributePos-(lastElementName+white+3));
EXML_PARSE_ATTRIBUTE(m_pos << " attribute : " << m_name << "=\"" << m_value << "\"");

View File

@ -41,7 +41,7 @@ bool exml::Comment::iParse(const std::string& _data, int32_t& _pos, bool _caseSe
}
}
// find end of value:
m_value = std::string(_data, _pos+white, newEnd);
m_value = std::string(_data, _pos+white, newEnd-(_pos+white));
EXML_VERBOSE(" find comment '" << m_value << "'");
_pos = iii+2;
return true;

View File

@ -219,7 +219,7 @@ bool exml::Element::subParse(const std::string& _data, int32_t& _pos, bool _case
}
tmpPos.check(_data[jjj]);
}
std::string tmpname = std::string(_data, iii+white+2, endPosName+1);
std::string tmpname = std::string(_data, iii+white+2, endPosName+1-(iii+white+2));
if (true == _caseSensitive) {
tmpname = to_lower(tmpname);
}
@ -322,7 +322,7 @@ bool exml::Element::subParse(const std::string& _data, int32_t& _pos, bool _case
}
tmpPos.check(_data[jjj]);
}
std::string tmpname = std::string(_data, iii+white+2, endPosName+1);
std::string tmpname = std::string(_data, iii+white+2, endPosName+1-(iii+white+2));
if (true == _caseSensitive) {
tmpname = to_lower(tmpname);
}
@ -359,13 +359,13 @@ bool exml::Element::subParse(const std::string& _data, int32_t& _pos, bool _case
return false;
}
if( true == checkAvaillable(_data[iii+white+1], true) ) {
if (checkAvaillable(_data[iii+white+1], true) == true) {
++tmpPos;
//EXML_DEBUG("Generate node name : '" << _data[iii+1] << "'");
int32_t endPosName = iii+white+1;
// generate element name ...
for (int32_t jjj=iii+white+2; jjj<_data.size(); jjj++) {
if(true == checkAvaillable(_data[jjj], false) ) {
if(checkAvaillable(_data[jjj], false) == true) {
// we find the end ...
endPosName = jjj;
} else {
@ -373,7 +373,7 @@ bool exml::Element::subParse(const std::string& _data, int32_t& _pos, bool _case
}
tmpPos.check(_data[jjj]);
}
std::string tmpname = std::string(_data, iii+white+1, endPosName+1);
std::string tmpname = std::string(_data, iii+white+1, endPosName+1-(iii+white+1));
if (true == _caseSensitive) {
to_lower(tmpname);
}

View File

@ -51,7 +51,7 @@ bool exml::Text::iParse(const std::string& _data, int32_t& _pos, bool _caseSensi
}
}
// find end of value:
m_value = std::string(_data, _pos, newEnd);
m_value = std::string(_data, _pos, newEnd-(_pos));
EXML_VERBOSE(" find text '" << m_value << "'");
_pos = iii-1;
return true;
@ -78,7 +78,7 @@ bool exml::TextCDATA::iParse(const std::string& _data, int32_t& _pos, bool _case
&& _data[iii+2] == '>') {
// find end of value:
_filePos += 2;
m_value = std::string(_data, _pos, iii);
m_value = std::string(_data, _pos, iii-(_pos));
EXML_VERBOSE(" find text CDATA '" << m_value << "'");
_pos = iii+2;
return true;