|
@@ -3,7 +3,7 @@
|
|
* Company: Lynar Studios
|
|
* Company: Lynar Studios
|
|
* E-Mail: webmaster@lynarstudios.com
|
|
* E-Mail: webmaster@lynarstudios.com
|
|
* Created: 2023-02-14
|
|
* Created: 2023-02-14
|
|
-* Changed: 2023-05-18
|
|
|
|
|
|
+* Changed: 2023-05-19
|
|
*
|
|
*
|
|
* */
|
|
* */
|
|
|
|
|
|
@@ -59,7 +59,7 @@ void SerializableSectionPairSection::unmarshal(const byte_field &_data)
|
|
this->_unmarshalRows(_data.substr(sectionHeaderSize));
|
|
this->_unmarshalRows(_data.substr(sectionHeaderSize));
|
|
}
|
|
}
|
|
|
|
|
|
-byte_field SerializableSectionPairSection::_collectSectionRow(const byte_field &_currentRows, SectionPairRowEnumType &_type)
|
|
|
|
|
|
+byte_field SerializableSectionPairSection::_collectSectionRow(const byte_field &_currentRows, SectionPairRowEnumType &_type) const
|
|
{
|
|
{
|
|
string row{};
|
|
string row{};
|
|
string newLine = this->parameter.getNewLine();
|
|
string newLine = this->parameter.getNewLine();
|
|
@@ -141,9 +141,8 @@ byte_field SerializableSectionPairSection::_getSectionHeader(const byte_field &_
|
|
{
|
|
{
|
|
byte_field sectionHeader{};
|
|
byte_field sectionHeader{};
|
|
string newLine = this->parameter.getNewLine();
|
|
string newLine = this->parameter.getNewLine();
|
|
- size_t position = SerializableSectionPairSection::_getNthSubStringPosition(_data, newLine);
|
|
|
|
|
|
|
|
- if (position != -1)
|
|
|
|
|
|
+ if (size_t position = SerializableSectionPairSection::_getNthSubStringPosition(_data, newLine); position != -1)
|
|
{
|
|
{
|
|
sectionHeader = _data.substr(0, position + 2 * newLine.size());
|
|
sectionHeader = _data.substr(0, position + 2 * newLine.size());
|
|
}
|
|
}
|
|
@@ -215,7 +214,7 @@ void SerializableSectionPairSection::_unmarshalRows(const byte_field &_serialize
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-size_t SerializableSectionPairSection::_unmarshalSectionHeader(const byte_field &_data)
|
|
|
|
|
|
+size_t SerializableSectionPairSection::_unmarshalSectionHeader(const byte_field &_data) const
|
|
{
|
|
{
|
|
byte_field sectionHeader = this->_getSectionHeader(_data);
|
|
byte_field sectionHeader = this->_getSectionHeader(_data);
|
|
dynamic_pointer_cast<SectionPairSection>(this->parameter.getValue())->setSectionId(SerializableSectionPairSection::_getSectionId(sectionHeader));
|
|
dynamic_pointer_cast<SectionPairSection>(this->parameter.getValue())->setSectionId(SerializableSectionPairSection::_getSectionId(sectionHeader));
|