Jelajahi Sumber

Harden security within io module

Patrick-Christopher Mattulat 1 hari lalu
induk
melakukan
ff44360423
39 mengubah file dengan 257 tambahan dan 259 penghapusan
  1. 2 2
      include/ls-std/io/xml/XmlParser.hpp
  2. 46 46
      source/ls-std/io/File.cpp
  3. 2 2
      source/ls-std/io/FileOutputStream.cpp
  4. 2 2
      source/ls-std/io/FilePathSeparatorMatch.cpp
  5. 2 2
      source/ls-std/io/NewLine.cpp
  6. 2 2
      source/ls-std/io/evaluator/FileExistenceEvaluator.cpp
  7. 2 2
      source/ls-std/io/logging/LogLevel.cpp
  8. 13 14
      source/ls-std/io/logging/Logger.cpp
  9. 2 2
      source/ls-std/io/section-pair/evaluator/SectionPairIdentifierArgumentEvaluator.cpp
  10. 2 2
      source/ls-std/io/section-pair/evaluator/SectionPairRowArgumentEvaluator.cpp
  11. 2 2
      source/ls-std/io/section-pair/evaluator/SectionPairRowListValueArgumentEvaluator.cpp
  12. 2 2
      source/ls-std/io/section-pair/evaluator/SectionPairRowSingleValueArgumentEvaluator.cpp
  13. 2 2
      source/ls-std/io/section-pair/evaluator/SectionPairSectionArgumentEvaluator.cpp
  14. 2 2
      source/ls-std/io/section-pair/evaluator/SectionPairValueArgumentEvaluator.cpp
  15. 5 5
      source/ls-std/io/section-pair/model/SectionPairDocument.cpp
  16. 2 2
      source/ls-std/io/section-pair/model/SectionPairRow.cpp
  17. 2 2
      source/ls-std/io/section-pair/model/SectionPairRowListValue.cpp
  18. 2 2
      source/ls-std/io/section-pair/model/SectionPairRowSingleValue.cpp
  19. 1 1
      source/ls-std/io/section-pair/model/SectionPairRowValue.cpp
  20. 4 4
      source/ls-std/io/section-pair/model/SectionPairSection.cpp
  21. 2 2
      source/ls-std/io/section-pair/reader/SectionPairFileReader.cpp
  22. 2 2
      source/ls-std/io/section-pair/reader/SectionPairFileReaderParameter.cpp
  23. 10 10
      source/ls-std/io/section-pair/serialization/SerializableSectionPairDocument.cpp
  24. 2 2
      source/ls-std/io/section-pair/serialization/SerializableSectionPairParameter.cpp
  25. 12 13
      source/ls-std/io/section-pair/serialization/SerializableSectionPairRow.cpp
  26. 7 7
      source/ls-std/io/section-pair/serialization/SerializableSectionPairRowListValue.cpp
  27. 2 2
      source/ls-std/io/section-pair/serialization/SerializableSectionPairRowSingleValue.cpp
  28. 19 19
      source/ls-std/io/section-pair/serialization/SerializableSectionPairSection.cpp
  29. 7 7
      source/ls-std/io/section-pair/validator/SectionPairDocumentValidator.cpp
  30. 5 5
      source/ls-std/io/section-pair/validator/SectionPairFileExtensionValidator.cpp
  31. 3 3
      source/ls-std/io/section-pair/validator/SectionPairIdentifierValidator.cpp
  32. 7 7
      source/ls-std/io/section-pair/validator/SectionPairRowListValueValidator.cpp
  33. 5 5
      source/ls-std/io/section-pair/validator/SectionPairRowSingleValueValidator.cpp
  34. 5 5
      source/ls-std/io/section-pair/validator/SectionPairRowValidator.cpp
  35. 3 3
      source/ls-std/io/section-pair/validator/SectionPairSectionValidator.cpp
  36. 4 5
      source/ls-std/io/section-pair/validator/SectionPairValueValidator.cpp
  37. 6 5
      source/ls-std/io/xml/XmlDeclaration.cpp
  38. 12 12
      source/ls-std/io/xml/XmlNode.cpp
  39. 45 45
      source/ls-std/io/xml/XmlParser.cpp

+ 2 - 2
include/ls-std/io/xml/XmlParser.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-25
- * Changed:         2024-09-13
+ * Changed:         2025-12-21
  *
  * */
 
@@ -74,7 +74,7 @@ namespace ls::std::io
       [[nodiscard]] ::std::string::size_type _parseMode(::std::string::size_type _index, const ls::std::core::type::byte_field &_data);
       [[nodiscard]] size_t _parseOpeningTag(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
       [[nodiscard]] static ::std::string_view _parseTagName(::std::string_view _data);
-      [[nodiscard]] size_t _parseValue(::std::string_view _data, ::std::string::size_type _index);
+      [[nodiscard]] size_t _parseValue(::std::string_view _data, ::std::string::size_type _index) const;
       void _reset();
       void _setMaxLevel();
   };

+ 46 - 46
source/ls-std/io/File.cpp

@@ -52,24 +52,24 @@ using std::string;
 using std::stringstream;
 using std::vector;
 
-File::File(string _absoluteFilePath) : Class("File"), absoluteFilePath(File::_normalizePath(::move(_absoluteFilePath)))
+File::File(string _absoluteFilePath) : Class("File"), absoluteFilePath(_normalizePath(::move(_absoluteFilePath)))
 {}
 
 File::~File() noexcept = default;
 
 bool File::operator==(const File &_file) const
 {
-  return File::_equals(*this, _file);
+  return _equals(*this, _file);
 }
 
 bool File::operator!=(const File &_file) const
 {
-  return !File::_equals(*this, _file);
+  return !_equals(*this, _file);
 }
 
 bool File::canExecute() const
 {
-  return File::_isExecutable(this->absoluteFilePath);
+  return _isExecutable(this->absoluteFilePath);
 }
 
 bool File::canRead() const
@@ -77,7 +77,7 @@ bool File::canRead() const
   bool readable{};
 
 #if defined(unix) || defined(__APPLE__)
-  readable = File::_isReadableUnix(this->absoluteFilePath);
+  readable = _isReadableUnix(this->absoluteFilePath);
 #endif
 #ifdef _WIN32
   readable = File::_isReadableWindows(this->absoluteFilePath);
@@ -88,12 +88,12 @@ bool File::canRead() const
 
 bool File::canWrite() const
 {
-  return File::_isWritable(this->absoluteFilePath);
+  return _isWritable(this->absoluteFilePath);
 }
 
 void File::createNewFile() const
 {
-  if (!File::_exists(this->absoluteFilePath))
+  if (!_exists(this->absoluteFilePath))
   {
     ofstream file{this->absoluteFilePath};
     file.close();
@@ -106,7 +106,7 @@ void File::createNewFile() const
 
 bool File::exists() const
 {
-  return File::_exists(this->absoluteFilePath);
+  return _exists(this->absoluteFilePath);
 }
 
 string File::getAbsoluteFilePath() const
@@ -120,20 +120,20 @@ string File::getName() const
 
   // if it's a directory, remove separator from end, if it does exist
 
-  if (File::_isDirectory(this->absoluteFilePath))
+  if (_isDirectory(this->absoluteFilePath))
   {
     copy.erase(remove_if(copy.end() - 1, copy.end(), FilePathSeparatorMatch()), copy.end());
   }
 
   // now get the file / directory name
 
-  auto base = find_if(copy.rbegin(), copy.rend(), FilePathSeparatorMatch()).base();
+  const auto base = find_if(copy.rbegin(), copy.rend(), FilePathSeparatorMatch()).base();
   return string{base, copy.end()};
 }
 
 string File::getParent() const
 {
-  return File::_getParent(this->absoluteFilePath);
+  return _getParent(this->absoluteFilePath);
 }
 
 string File::getWorkingDirectory()
@@ -141,7 +141,7 @@ string File::getWorkingDirectory()
   string workingDirectory{};
 
 #if defined(unix) || defined(__APPLE__)
-  workingDirectory = File::_getWorkingDirectoryUnix();
+  workingDirectory = _getWorkingDirectoryUnix();
 #endif
 #ifdef _WIN32
   workingDirectory = File::_getWorkingDirectoryWindows();
@@ -154,7 +154,7 @@ size_t File::getSize() const
 {
   streampos fileSize{};
 
-  if (File::_exists(this->absoluteFilePath))
+  if (_exists(this->absoluteFilePath))
   {
     ifstream fileHandler{this->absoluteFilePath, ios::in};
     fileSize = fileHandler.tellg();
@@ -169,26 +169,26 @@ size_t File::getSize() const
 
 bool File::isDirectory() const
 {
-  return File::_isDirectory(this->absoluteFilePath);
+  return _isDirectory(this->absoluteFilePath);
 }
 
 bool File::isFile() const
 {
-  return File::_isFile(this->absoluteFilePath);
+  return _isFile(this->absoluteFilePath);
 }
 
 time_t File::lastModified() const
 {
-  return File::_lastModified(this->absoluteFilePath);
+  return _lastModified(this->absoluteFilePath);
 }
 
 ::list<string> File::list() const
 {
   ::list<string> fileList{};
 
-  if (File::_isDirectory(this->absoluteFilePath))
+  if (_isDirectory(this->absoluteFilePath))
   {
-    fileList = File::_list(this->absoluteFilePath);
+    fileList = _list(this->absoluteFilePath);
   }
 
   return fileList;
@@ -198,9 +198,9 @@ time_t File::lastModified() const
 {
   ::list<string> fileList{};
 
-  if (File::_isDirectory(this->absoluteFilePath))
+  if (_isDirectory(this->absoluteFilePath))
   {
-    fileList = File::_listFiles(this->absoluteFilePath);
+    fileList = _listFiles(this->absoluteFilePath);
   }
 
   return fileList;
@@ -208,7 +208,7 @@ time_t File::lastModified() const
 
 void File::makeDirectory() const
 {
-  if (!File::_makeDirectory(this->absoluteFilePath))
+  if (!_makeDirectory(this->absoluteFilePath))
   {
     throw FileOperationException{R"lit(directory ")lit" + this->absoluteFilePath + R"lit(" could not be created!)lit"};
   }
@@ -216,7 +216,7 @@ void File::makeDirectory() const
 
 void File::makeDirectories() const
 {
-  vector<string> subDirectories = File::_splitIntoSubDirectoryNames(this->absoluteFilePath);
+  const vector<string> subDirectories = _splitIntoSubDirectoryNames(this->absoluteFilePath);
   const char separator = FilePathSeparator::get();
   string currentHierarchy{};
 
@@ -224,7 +224,7 @@ void File::makeDirectories() const
   {
     currentHierarchy += subDirectory;
 
-    if (!File::_exists(currentHierarchy + separator) && !currentHierarchy.empty() && !File::_makeDirectory(currentHierarchy))
+    if (!_exists(currentHierarchy + separator) && !currentHierarchy.empty() && !_makeDirectory(currentHierarchy))
     {
       throw FileOperationException{"operation: create directory"};
     }
@@ -235,20 +235,20 @@ void File::makeDirectories() const
 
 void File::remove() const
 {
-  if (File::_isFile(this->absoluteFilePath))
+  if (_isFile(this->absoluteFilePath))
   {
     ::remove(this->absoluteFilePath.c_str());
   }
 
-  if (File::_isDirectory(this->absoluteFilePath))
+  if (_isDirectory(this->absoluteFilePath))
   {
-    File::_remove(this->absoluteFilePath);
+    _remove(this->absoluteFilePath);
   }
 }
 
 bool File::renameTo(const string &_newName)
 {
-  bool renamed = File::_renameTo(this->absoluteFilePath, _newName);
+  const bool renamed = _renameTo(this->absoluteFilePath, _newName);
 
   if (renamed)
   {
@@ -260,7 +260,7 @@ bool File::renameTo(const string &_newName)
 
 void File::reset(const string &_newPath)
 {
-  this->absoluteFilePath = File::_normalizePath(_newPath);
+  this->absoluteFilePath = _normalizePath(_newPath);
 }
 
 #ifdef _WIN32
@@ -287,7 +287,7 @@ void File::_addToFileListWindows(const string &_path, bool _withDirectories, WIN
 
 #if defined(unix) || defined(__APPLE__)
 
-void File::_addToFileListUnix(const string &_path, bool _withDirectories, const dirent *directoryEntity, ::list<string> &_list)
+void File::_addToFileListUnix(const string &_path, const bool _withDirectories, const dirent *directoryEntity, ::list<string> &_list)
 {
   const char separator = FilePathSeparator::get();
   string absolutePath = _path + separator + directoryEntity->d_name;
@@ -298,7 +298,7 @@ void File::_addToFileListUnix(const string &_path, bool _withDirectories, const
   }
   else
   {
-    if (File::_isFile(absolutePath))
+    if (_isFile(absolutePath))
     {
       _list.emplace_back(absolutePath);
     }
@@ -385,7 +385,7 @@ bool File::_isDirectory(const string &_path)
 
   if (struct stat _stat{}; stat(_path.c_str(), &_stat) == 0)
   {
-    match = _stat.st_mode & (unsigned short) S_IFDIR;
+    match = _stat.st_mode & static_cast<unsigned short>(S_IFDIR);
   }
 
   return match;
@@ -395,7 +395,7 @@ bool File::_isExecutable(const string &_path)
 {
   bool executable{};
 
-  if (File::_exists(_path))
+  if (_exists(_path))
   {
     struct stat _stat
     {
@@ -403,7 +403,7 @@ bool File::_isExecutable(const string &_path)
 
     if (stat(_path.c_str(), &_stat) == 0)
     {
-      executable = (_stat.st_mode & (unsigned short) S_IEXEC) != 0;
+      executable = (_stat.st_mode & static_cast<unsigned short>(S_IEXEC)) != 0;
     }
   }
 
@@ -416,7 +416,7 @@ bool File::_isFile(const string &_path)
 
   if (struct stat _stat{}; stat(_path.c_str(), &_stat) == 0)
   {
-    match = _stat.st_mode & (unsigned) S_IFREG;
+    match = _stat.st_mode & static_cast<unsigned>(S_IFREG);
   }
 
   return match;
@@ -428,7 +428,7 @@ bool File::_isReadableUnix(const string &_path)
 {
   bool readable{};
 
-  if (File::_exists(_path))
+  if (_exists(_path))
   {
     struct stat _stat
     {
@@ -436,7 +436,7 @@ bool File::_isReadableUnix(const string &_path)
 
     if (stat(_path.c_str(), &_stat) == 0)
     {
-      readable = (_stat.st_mode & (unsigned) S_IREAD) != 0;
+      readable = (_stat.st_mode & static_cast<unsigned>(S_IREAD)) != 0;
     }
   }
   else
@@ -475,7 +475,7 @@ bool File::_isWritable(const string &_path)
 {
   bool writable{};
 
-  if (File::_exists(_path))
+  if (_exists(_path))
   {
     struct stat _stat
     {
@@ -483,7 +483,7 @@ bool File::_isWritable(const string &_path)
 
     if (stat(_path.c_str(), &_stat) == 0)
     {
-      writable = (_stat.st_mode & (unsigned) S_IWRITE) != 0;
+      writable = (_stat.st_mode & static_cast<unsigned>(S_IWRITE)) != 0;
     }
   }
 
@@ -507,7 +507,7 @@ time_t File::_lastModified(const string &_path)
   ::list<string> filesInDirectory{};
 
 #if defined(unix) || defined(__APPLE__)
-  filesInDirectory = File::_listUnix(_path, true);
+  filesInDirectory = _listUnix(_path, true);
 #endif
 #ifdef _WIN32
   filesInDirectory = File::_listWindows(_path, true);
@@ -521,7 +521,7 @@ time_t File::_lastModified(const string &_path)
   ::list<string> filesInDirectory{};
 
 #if defined(unix) || defined(__APPLE__)
-  filesInDirectory = File::_listUnix(_path, false);
+  filesInDirectory = _listUnix(_path, false);
 #endif
 #ifdef _WIN32
   filesInDirectory = File::_listWindows(_path, false);
@@ -532,16 +532,16 @@ time_t File::_lastModified(const string &_path)
 
 #if defined(unix) || defined(__APPLE__)
 
-::list<string> File::_listUnix(const string &_path, bool withDirectories)
+::list<string> File::_listUnix(const string &_path, const bool withDirectories)
 {
   ::list<string> filesInDirectory{};
   DIR *directory = opendir(_path.c_str());
-  const struct dirent *directoryEntity;
+  const dirent *directoryEntity;
   string absolutePath{};
 
   while ((directoryEntity = readdir(directory)) != nullptr)
   {
-    File::_addToFileListUnix(_path, withDirectories, directoryEntity, filesInDirectory);
+    _addToFileListUnix(_path, withDirectories, directoryEntity, filesInDirectory);
   }
 
   closedir(directory);
@@ -591,8 +591,8 @@ bool File::_makeDirectory(const string &_path)
 
 string File::_normalizePath(string _path)
 {
-  _path = File::_replaceWrongSeparator(_path);
-  _path = File::_reduceSeparators(_path);
+  _path = _replaceWrongSeparator(_path);
+  _path = _reduceSeparators(_path);
 
   return _path;
 }
@@ -627,7 +627,7 @@ string File::_reduceSeparators(const string &_path)
 void File::_remove(const string &_path)
 {
 #if defined(unix) || defined(__APPLE__)
-  File::_removeUnix(_path);
+  _removeUnix(_path);
 #endif
 #ifdef _WIN32
   File::_removeWindows(_path);

+ 2 - 2
source/ls-std/io/FileOutputStream.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2023-05-16
+ * Changed:         2025-12-21
  *
  * */
 
@@ -29,7 +29,7 @@ FileOutputStream::FileOutputStream(const File &_file) : Class("FileOutputStream"
   this->_init();
 }
 
-FileOutputStream::FileOutputStream(const File &_file, bool _append) : Class("FileOutputStream"), append(_append), file(_file)
+FileOutputStream::FileOutputStream(const File &_file, const bool _append) : Class("FileOutputStream"), append(_append), file(_file)
 {
   this->_init();
 }

+ 2 - 2
source/ls-std/io/FilePathSeparatorMatch.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-05
-* Changed:         2023-02-23
+* Changed:         2025-12-21
 *
 * */
 
@@ -17,7 +17,7 @@ FilePathSeparatorMatch::FilePathSeparatorMatch() = default;
 
 FilePathSeparatorMatch::~FilePathSeparatorMatch() = default;
 
-bool FilePathSeparatorMatch::operator()(char _char) const
+bool FilePathSeparatorMatch::operator()(const char _char) const
 {
   return _char == FilePathSeparator::getWindowsFilePathSeparator() || _char == FilePathSeparator::getUnixFilePathSeparator();
 }

+ 2 - 2
source/ls-std/io/NewLine.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-04
-* Changed:         2023-02-23
+* Changed:         2025-12-21
 *
 * */
 
@@ -21,7 +21,7 @@ string NewLine::get()
   string newLine{};
 
 #if defined(unix) || defined(__APPLE__)
-  newLine = NewLine::getUnixNewLine();
+  newLine = getUnixNewLine();
 #endif
 #ifdef _WIN32
   newLine = NewLine::getWindowsNewLine();

+ 2 - 2
source/ls-std/io/evaluator/FileExistenceEvaluator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-02-23
+* Changed:         2025-12-21
 *
 * */
 
@@ -28,7 +28,7 @@ void FileExistenceEvaluator::evaluate()
 {
   if (!File{this->filePath}.exists())
   {
-    string message = "\"" + this->filePath + "\" does not exist!";
+    const string message = "\"" + this->filePath + "\" does not exist!";
     throw FileNotFoundException{message};
   }
 }

+ 2 - 2
source/ls-std/io/logging/LogLevel.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2023-05-19
+ * Changed:         2025-12-21
  *
  * */
 
@@ -108,7 +108,7 @@ void LogLevel::_init()
   this->level.try_emplace(LogLevelValue::TRACE, "TRACE");
 }
 
-bool LogLevel::_isValidLogLevelString(string_view _value) const
+bool LogLevel::_isValidLogLevelString(const string_view _value) const
 {
   bool isValidString{};
 

+ 13 - 14
source/ls-std/io/logging/Logger.cpp

@@ -3,11 +3,10 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2023-05-24
+ * Changed:         2025-12-21
  *
  * */
 
-#include <ctime>
 #include <iomanip>
 #include <ls-std/core/evaluator/NullPointerArgumentEvaluator.hpp>
 #include <ls-std/io/NewLine.hpp>
@@ -122,7 +121,7 @@ void Logger::_assignWriter(const shared_ptr<IWriter> &_writer)
   this->writer = _writer;
 }
 
-string Logger::_buildCharacterChain(size_t _amount)
+string Logger::_buildCharacterChain(const size_t _amount)
 {
   string fillContent{};
 
@@ -134,15 +133,15 @@ string Logger::_buildCharacterChain(size_t _amount)
   return fillContent;
 }
 
-string Logger::_createFillContent(string_view _text)
+string Logger::_createFillContent(const string_view _text)
 {
-  size_t padSize = 10;
-  size_t fillSize = _text.size() > padSize ? 0 : padSize - _text.size();
+  constexpr size_t padSize = 10;
+  const size_t fillSize = _text.size() > padSize ? 0 : padSize - _text.size();
   string fillContent{};
 
   if (fillSize > 0)
   {
-    fillContent = Logger::_buildCharacterChain(fillSize);
+    fillContent = _buildCharacterChain(fillSize);
   }
 
   return fillContent;
@@ -162,7 +161,7 @@ string Logger::_getLogLevelString(const LogLevel &_logLevel) const
 
   if (this->displayLogLevel)
   {
-    logLevelString = Logger::_padRight(string{_logLevel.toString() + ":"});
+    logLevelString = _padRight(string{_logLevel.toString() + ":"});
   }
 
   return logLevelString;
@@ -171,7 +170,7 @@ string Logger::_getLogLevelString(const LogLevel &_logLevel) const
 string Logger::_getTimestampString() const
 {
   time_t timestamp = ::time(nullptr);
-  struct tm localTime
+  tm localTime
   {
   };
 #if defined(unix) || defined(__APPLE__)
@@ -184,7 +183,7 @@ string Logger::_getTimestampString() const
 
   if (this->displayTimestamp)
   {
-    timestampString = "[" + Logger::_generateTimeString(&localTime) + "] ";
+    timestampString = "[" + _generateTimeString(&localTime) + "] ";
   }
 
   return timestampString;
@@ -192,13 +191,13 @@ string Logger::_getTimestampString() const
 
 void Logger::_log(const byte_type *_data, const LogLevel &_logLevel) const
 {
-  string logLevelString = this->_getLogLevelString(_logLevel);
-  string timestampString = this->_getTimestampString();
-  string message = timestampString + logLevelString + string(_data) + NewLine::getUnixNewLine();
+  const string logLevelString = this->_getLogLevelString(_logLevel);
+  const string timestampString = this->_getTimestampString();
+  const string message = timestampString + logLevelString + string(_data) + NewLine::getUnixNewLine();
   this->writer->write(message);
 }
 
 string Logger::_padRight(const string &_text)
 {
-  return _text + Logger::_createFillContent(_text);
+  return _text + _createFillContent(_text);
 }

+ 2 - 2
source/ls-std/io/section-pair/evaluator/SectionPairIdentifierArgumentEvaluator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-09
-* Changed:         2023-02-23
+* Changed:         2025-12-21
 *
 * */
 
@@ -31,7 +31,7 @@ void SectionPairIdentifierArgumentEvaluator::evaluate()
 {
   if (!SectionPairIdentifierValidator{this->identifier}.isValid())
   {
-    string message = "\"" + this->identifier + "\" is not a valid identifier!";
+    const string message = "\"" + this->identifier + "\" is not a valid identifier!";
     throw IllegalArgumentException{SectionPairMessageFormatter::getFormattedMessage(message)};
   }
 }

+ 2 - 2
source/ls-std/io/section-pair/evaluator/SectionPairRowArgumentEvaluator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-20
-* Changed:         2023-02-23
+* Changed:         2025-12-21
 *
 * */
 
@@ -30,7 +30,7 @@ void SectionPairRowArgumentEvaluator::evaluate()
 {
   if (!SectionPairRowValidator{this->sectionPairRow}.isValid())
   {
-    string message = "\"" + this->sectionPairRow + "\" is not a valid section pair row!";
+    const string message = "\"" + this->sectionPairRow + "\" is not a valid section pair row!";
     throw IllegalArgumentException{SectionPairMessageFormatter::getFormattedMessage(message)};
   }
 }

+ 2 - 2
source/ls-std/io/section-pair/evaluator/SectionPairRowListValueArgumentEvaluator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-20
-* Changed:         2023-02-23
+* Changed:         2025-12-21
 *
 * */
 
@@ -29,7 +29,7 @@ void SectionPairRowListValueArgumentEvaluator::evaluate()
 {
   if (!SectionPairRowListValueValidator{this->listValueRow}.isValid())
   {
-    string message = "\"" + this->listValueRow + "\" is not a valid section pair list value row!";
+    const string message = "\"" + this->listValueRow + "\" is not a valid section pair list value row!";
     throw IllegalArgumentException{SectionPairMessageFormatter::getFormattedMessage(message)};
   }
 }

+ 2 - 2
source/ls-std/io/section-pair/evaluator/SectionPairRowSingleValueArgumentEvaluator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-19
-* Changed:         2023-02-23
+* Changed:         2025-12-21
 *
 * */
 
@@ -29,7 +29,7 @@ void SectionPairRowSingleValueArgumentEvaluator::evaluate()
 {
   if (!SectionPairRowSingleValueValidator{this->singleValueRow}.isValid())
   {
-    string message = "\"" + this->singleValueRow + "\" is not a valid section pair single value row!";
+    const string message = "\"" + this->singleValueRow + "\" is not a valid section pair single value row!";
     throw IllegalArgumentException{SectionPairMessageFormatter::getFormattedMessage(message)};
   }
 }

+ 2 - 2
source/ls-std/io/section-pair/evaluator/SectionPairSectionArgumentEvaluator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-20
-* Changed:         2023-02-23
+* Changed:         2025-12-21
 *
 * */
 
@@ -29,7 +29,7 @@ void SectionPairSectionArgumentEvaluator::evaluate()
 {
   if (!SectionPairSectionValidator{this->section}.isValid())
   {
-    string message = "\"" + this->section + "\" is not a valid section!";
+    const string message = "\"" + this->section + "\" is not a valid section!";
     throw IllegalArgumentException{SectionPairMessageFormatter::getFormattedMessage(message)};
   }
 }

+ 2 - 2
source/ls-std/io/section-pair/evaluator/SectionPairValueArgumentEvaluator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-23
+* Changed:         2025-12-21
 *
 * */
 
@@ -30,7 +30,7 @@ void SectionPairValueArgumentEvaluator::evaluate()
 {
   if (!SectionPairValueValidator(this->value).isValid())
   {
-    string message = "\"" + this->value + "\" is not a valid value!";
+    const string message = "\"" + this->value + "\" is not a valid value!";
     throw IllegalArgumentException{SectionPairMessageFormatter::getFormattedMessage(message)};
   }
 }

+ 5 - 5
source/ls-std/io/section-pair/model/SectionPairDocument.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-15
-* Changed:         2023-05-16
+* Changed:         2025-12-21
 *
 * */
 
@@ -42,7 +42,7 @@ SectionPairDocument::~SectionPairDocument() noexcept = default;
 
 void SectionPairDocument::add(const section_pair_document_section_list_element &_section)
 {
-  string message = this->getClassName() + ": add section attempt failed, since \"_section\" argument is null!";
+  const string message = this->getClassName() + ": add section attempt failed, since \"_section\" argument is null!";
   NullPointerArgumentEvaluator(reinterpret_pointer_cast<void>(_section), message).evaluate();
   this->_checkSectionExistence(_section->getSectionId());
   this->sections.push_back(_section);
@@ -53,7 +53,7 @@ void SectionPairDocument::clear()
   this->sections.clear();
 }
 
-section_pair_document_section_list_element SectionPairDocument::get(size_t _index) const
+section_pair_document_section_list_element SectionPairDocument::get(const size_t _index) const
 {
   section_pair_document_section_list_element element{};
   IndexOutOfBoundsEvaluator{_index, this->sections.size()}.evaluate();
@@ -104,7 +104,7 @@ byte_field SectionPairDocument::marshal()
   return this->serializable->marshal();
 }
 
-void SectionPairDocument::reserveNewLine(string_view _reservedNewLine)
+void SectionPairDocument::reserveNewLine(const string_view _reservedNewLine)
 {
   this->reservedNewLine = _reservedNewLine;
 }
@@ -119,7 +119,7 @@ void SectionPairDocument::_checkSectionExistence(const section_pair_identifier &
 {
   if (this->_hasSection(_sectionId))
   {
-    string message = this->getClassName() + "section ID \"" + _sectionId + "\" already exists in document!";
+    const string message = this->getClassName() + "section ID \"" + _sectionId + "\" already exists in document!";
     throw IllegalArgumentException{SectionPairMessageFormatter::getFormattedMessage(message)};
   }
 }

+ 2 - 2
source/ls-std/io/section-pair/model/SectionPairRow.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -70,7 +70,7 @@ byte_field SectionPairRow::marshal()
   return this->serializable->marshal();
 }
 
-void SectionPairRow::reserveNewLine(string_view _reservedNewLine)
+void SectionPairRow::reserveNewLine(const string_view _reservedNewLine)
 {
   this->reservedNewLine = _reservedNewLine;
 }

+ 2 - 2
source/ls-std/io/section-pair/model/SectionPairRowListValue.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-05-22
+* Changed:         2025-12-21
 *
 * */
 
@@ -46,7 +46,7 @@ void SectionPairRowListValue::clear()
   this->values.clear();
 }
 
-section_pair_row_value SectionPairRowListValue::get(size_t _index) const
+section_pair_row_value SectionPairRowListValue::get(const size_t _index) const
 {
   IndexOutOfBoundsEvaluator(_index, this->values.size()).evaluate();
   section_pair_row_value value{};

+ 2 - 2
source/ls-std/io/section-pair/model/SectionPairRowSingleValue.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-05-22
+* Changed:         2025-12-21
 *
 * */
 
@@ -79,7 +79,7 @@ void SectionPairRowSingleValue::_set(const section_pair_row_value &_value)
 {
   EmptyStringArgumentEvaluator{_value}.evaluate();
   SectionPairValueArgumentEvaluator(_value).evaluate();
-  string newLine = this->_getReservedNewLine().empty() ? NewLine::get() : this->_getReservedNewLine();
+  const string newLine = this->_getReservedNewLine().empty() ? NewLine::get() : this->_getReservedNewLine();
   this->value = _value;
 
   if (this->value.find(newLine) != string::npos)

+ 1 - 1
source/ls-std/io/section-pair/model/SectionPairRowValue.cpp

@@ -27,7 +27,7 @@ byte_field SectionPairRowValue::marshal()
   return byte_field{};
 }
 
-void SectionPairRowValue::reserveNewLine(string_view _reservedNewLine)
+void SectionPairRowValue::reserveNewLine(const string_view _reservedNewLine)
 {
   this->reservedNewLine = _reservedNewLine;
 }

+ 4 - 4
source/ls-std/io/section-pair/model/SectionPairSection.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-13
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -59,7 +59,7 @@ void SectionPairSection::clear()
   this->rows.clear();
 }
 
-section_pair_row_list_element SectionPairSection::get(size_t _index) const
+section_pair_row_list_element SectionPairSection::get(const size_t _index) const
 {
   IndexOutOfBoundsEvaluator{_index, this->rows.size()}.evaluate();
   section_pair_row_list_element element{};
@@ -110,7 +110,7 @@ byte_field SectionPairSection::marshal()
   return this->serializable->marshal();
 }
 
-void SectionPairSection::reserveNewLine(string_view _reservedNewLine)
+void SectionPairSection::reserveNewLine(const string_view _reservedNewLine)
 {
   this->reservedNewLine = _reservedNewLine;
 }
@@ -154,7 +154,7 @@ void SectionPairSection::_rowExistenceCheck(const section_pair_identifier &_key)
 {
   if (this->_hasRow(_key))
   {
-    string message = this->getClassName() + ": row key \"" + _key + "\" already exists in section \"" + this->sectionId + "\"!";
+    const string message = this->getClassName() + ": row key \"" + _key + "\" already exists in section \"" + this->sectionId + "\"!";
     throw IllegalArgumentException{SectionPairMessageFormatter::getFormattedMessage(message)};
   }
 }

+ 2 - 2
source/ls-std/io/section-pair/reader/SectionPairFileReader.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -60,7 +60,7 @@ void SectionPairFileReader::_checkFileExtension() const
 {
   if (!SectionPairFileExtensionValidator{this->parameter.getFilePath()}.isValid())
   {
-    string message = "\"" + this->parameter.getFilePath() + "\" does not have a valid section pair file extension (.txt or .sp)!";
+    const string message = "\"" + this->parameter.getFilePath() + "\" does not have a valid section pair file extension (.txt or .sp)!";
     throw IllegalArgumentException{message};
   }
 }

+ 2 - 2
source/ls-std/io/section-pair/reader/SectionPairFileReaderParameter.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -51,7 +51,7 @@ void SectionPairFileReaderParameter::setFileExistenceEvaluator(const shared_ptr<
   this->fileExistenceEvaluator = _fileExistenceEvaluator;
 }
 
-void SectionPairFileReaderParameter::setFilePath(string_view _filePath)
+void SectionPairFileReaderParameter::setFilePath(const string_view _filePath)
 {
   this->filePath = _filePath;
 }

+ 10 - 10
source/ls-std/io/section-pair/serialization/SerializableSectionPairDocument.cpp

@@ -27,7 +27,7 @@ using std::string_view;
 
 SerializableSectionPairDocument::SerializableSectionPairDocument(const SerializableSectionPairParameter &_parameter) : Class("SerializableSectionPairDocument"), parameter(_parameter)
 {
-  string message = this->getClassName() + ": model reference is null!";
+  const string message = this->getClassName() + ": model reference is null!";
   NullPointerArgumentEvaluator{_parameter.getValue(), message}.evaluate();
 }
 
@@ -40,8 +40,8 @@ shared_ptr<Class> SerializableSectionPairDocument::getValue() const
 
 byte_field SerializableSectionPairDocument::marshal()
 {
-  shared_ptr<SectionPairDocument> document = dynamic_pointer_cast<SectionPairDocument>(this->parameter.getValue());
-  string newLine = this->parameter.getNewLine();
+  const shared_ptr<SectionPairDocument> document = dynamic_pointer_cast<SectionPairDocument>(this->parameter.getValue());
+  const string newLine = this->parameter.getNewLine();
   byte_field serializedDocument = document->getHeader() + newLine;
 
   for (const auto &_section : document->getSectionList())
@@ -56,7 +56,7 @@ byte_field SerializableSectionPairDocument::marshal()
 void SerializableSectionPairDocument::unmarshal(const byte_field &_data)
 {
   byte_field serializedDocument = _data;
-  size_t headerSize = dynamic_pointer_cast<SectionPairDocument>(this->parameter.getValue())->getHeader().size() + this->parameter.getNewLine().size();
+  const size_t headerSize = dynamic_pointer_cast<SectionPairDocument>(this->parameter.getValue())->getHeader().size() + this->parameter.getNewLine().size();
   serializedDocument = serializedDocument.substr(headerSize);
   byte_field serializedSection{};
 
@@ -70,15 +70,15 @@ void SerializableSectionPairDocument::unmarshal(const byte_field &_data)
 
 void SerializableSectionPairDocument::_addSection(const byte_field &_serializedSection) const
 {
-  auto section = make_shared<SectionPairSection>("tmp-id");
+  const auto section = make_shared<SectionPairSection>("tmp-id");
   section->reserveNewLine(this->parameter.getNewLine());
   section->unmarshal(_serializedSection);
   dynamic_pointer_cast<SectionPairDocument>(this->parameter.getValue())->add(section);
 }
 
-byte_field SerializableSectionPairDocument::_getCurrentRow(size_t _iterations, string_view _serializedDocument) const
+byte_field SerializableSectionPairDocument::_getCurrentRow(const size_t _iterations, const string_view _serializedDocument) const
 {
-  string newLine = this->parameter.getNewLine();
+  const string newLine = this->parameter.getNewLine();
   string currentRow{};
 
   if (_iterations == 1 || _serializedDocument.find('[') != string::npos)
@@ -100,7 +100,7 @@ byte_field SerializableSectionPairDocument::_getNextSerializedSection(const byte
   size_t iterations{};
   byte_field serializedDocument = _serializedDocument;
   bool isNotNewSection{};
-  string newLine = this->parameter.getNewLine();
+  const string newLine = this->parameter.getNewLine();
 
   do
   {
@@ -114,8 +114,8 @@ byte_field SerializableSectionPairDocument::_getNextSerializedSection(const byte
   return serializedDocument.empty() ? serializedSection : serializedSection.substr(0, serializedSection.size() - newLine.size());
 }
 
-bool SerializableSectionPairDocument::_isNotNewSection(string_view _currentRow) const
+bool SerializableSectionPairDocument::_isNotNewSection(const string_view _currentRow) const
 {
-  string newLine = this->parameter.getNewLine();
+  const string newLine = this->parameter.getNewLine();
   return _currentRow.find(newLine + newLine) == string::npos;
 }

+ 2 - 2
source/ls-std/io/section-pair/serialization/SerializableSectionPairParameter.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-17
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -32,7 +32,7 @@ shared_ptr<Class> SerializableSectionPairParameter::getValue() const
   return this->value;
 }
 
-void SerializableSectionPairParameter::setNewLine(string_view _newLine)
+void SerializableSectionPairParameter::setNewLine(const string_view _newLine)
 {
   this->parseNewLine = _newLine;
 }

+ 12 - 13
source/ls-std/io/section-pair/serialization/SerializableSectionPairRow.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-11
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -31,7 +31,7 @@ using std::string;
 
 SerializableSectionPairRow::SerializableSectionPairRow(const SerializableSectionPairParameter &_parameter) : Class("SerializableSectionPairRow"), parameter(_parameter)
 {
-  string message = this->getClassName() + ": model reference is null!";
+  const string message = this->getClassName() + ": model reference is null!";
   NullPointerArgumentEvaluator{_parameter.getValue(), message}.evaluate();
 }
 
@@ -44,15 +44,15 @@ shared_ptr<Class> SerializableSectionPairRow::getValue() const
 
 byte_field SerializableSectionPairRow::marshal()
 {
-  byte_field data = this->_marshalKey();
-  shared_ptr<SectionPairRow> row = dynamic_pointer_cast<SectionPairRow>(this->parameter.getValue());
+  const byte_field data = this->_marshalKey();
+  const shared_ptr<SectionPairRow> row = dynamic_pointer_cast<SectionPairRow>(this->parameter.getValue());
   row->getValue()->reserveNewLine(this->parameter.getNewLine());
   return data + row->getValue()->marshal();
 }
 
 void SerializableSectionPairRow::unmarshal(const byte_field &_data)
 {
-  shared_ptr<SectionPairRow> row = dynamic_pointer_cast<SectionPairRow>(this->parameter.getValue());
+  const shared_ptr<SectionPairRow> row = dynamic_pointer_cast<SectionPairRow>(this->parameter.getValue());
   row->getValue()->reserveNewLine(this->parameter.getNewLine());
 
   if (row->isSingleValue())
@@ -69,7 +69,7 @@ void SerializableSectionPairRow::unmarshal(const byte_field &_data)
 string SerializableSectionPairRow::_marshalKey() const
 {
   string serializedKey{};
-  shared_ptr<SectionPairRow> row = dynamic_pointer_cast<SectionPairRow>(this->parameter.getValue());
+  const shared_ptr<SectionPairRow> row = dynamic_pointer_cast<SectionPairRow>(this->parameter.getValue());
 
   if (row->isSingleValue())
   {
@@ -87,14 +87,14 @@ string SerializableSectionPairRow::_marshalKey() const
 void SerializableSectionPairRow::_unmarshalListValue(const byte_field &_data) const
 {
   SectionPairRowListValueArgumentEvaluator{_data}.evaluate();
-  string::size_type separatorPosition = _data.find(':');
-  string newLine = this->parameter.getNewLine();
+  const string::size_type separatorPosition = _data.find(':');
+  const string newLine = this->parameter.getNewLine();
 
   if (separatorPosition != string::npos)
   {
-    shared_ptr<SectionPairRow> row = dynamic_pointer_cast<SectionPairRow>(this->parameter.getValue());
+    const shared_ptr<SectionPairRow> row = dynamic_pointer_cast<SectionPairRow>(this->parameter.getValue());
     row->setKey(_data.substr(0, separatorPosition));
-    string::size_type newLinePosition = _data.find(newLine) + (newLine.size() - 1);
+    const string::size_type newLinePosition = _data.find(newLine) + (newLine.size() - 1);
     dynamic_pointer_cast<SectionPairRowListValue>(row->getValue())->unmarshal(_data.substr(newLinePosition + 1));
   }
 }
@@ -102,11 +102,10 @@ void SerializableSectionPairRow::_unmarshalListValue(const byte_field &_data) co
 void SerializableSectionPairRow::_unmarshalSingleValue(const byte_field &_data) const
 {
   SectionPairRowSingleValueArgumentEvaluator{_data}.evaluate();
-  string::size_type position = _data.find('=');
 
-  if (position != string::npos)
+  if (const string::size_type position = _data.find('='); position != string::npos)
   {
-    shared_ptr<SectionPairRow> row = dynamic_pointer_cast<SectionPairRow>(this->parameter.getValue());
+    const shared_ptr<SectionPairRow> row = dynamic_pointer_cast<SectionPairRow>(this->parameter.getValue());
     row->setKey(_data.substr(0, position));
     dynamic_pointer_cast<SectionPairRowSingleValue>(row->getValue())->unmarshal(_data.substr(position + 1));
   }

+ 7 - 7
source/ls-std/io/section-pair/serialization/SerializableSectionPairRowListValue.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-11
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -32,7 +32,7 @@ using std::string_view;
 
 SerializableSectionPairRowListValue::SerializableSectionPairRowListValue(const SerializableSectionPairParameter &_parameter) : Class("SerializableSectionPairRowListValue"), parameter(_parameter)
 {
-  string message = this->getClassName() + ": model reference is null!";
+  const string message = this->getClassName() + ": model reference is null!";
   NullPointerArgumentEvaluator{_parameter.getValue(), message}.evaluate();
 }
 
@@ -53,19 +53,19 @@ void SerializableSectionPairRowListValue::unmarshal(const byte_field &_data)
 {
   EmptyStringArgumentEvaluator{_data}.evaluate();
   byte_field searchText = _data;
-  string newLine = this->parameter.getNewLine();
+  const string newLine = this->parameter.getNewLine();
 
   while (!searchText.empty() && searchText != newLine)
   {
-    string::size_type positionOfNewLine = searchText.find(newLine);
-    string line = SerializableSectionPairRowListValue::_getLine(positionOfNewLine, searchText);
+    const string::size_type positionOfNewLine = searchText.find(newLine);
+    string line = _getLine(positionOfNewLine, searchText);
     line = line.substr(2);
     dynamic_pointer_cast<SectionPairRowListValue>(this->getValue())->add(line);
     this->_updateSearchText(positionOfNewLine, searchText);
   }
 }
 
-string SerializableSectionPairRowListValue::_getLine(string::size_type _position, string_view _searchText)
+string SerializableSectionPairRowListValue::_getLine(const string::size_type _position, const string_view _searchText)
 {
   string line{};
 
@@ -81,7 +81,7 @@ string SerializableSectionPairRowListValue::_getLine(string::size_type _position
   return line;
 }
 
-void SerializableSectionPairRowListValue::_updateSearchText(string::size_type _position, byte_field &_searchText) const
+void SerializableSectionPairRowListValue::_updateSearchText(const string::size_type _position, byte_field &_searchText) const
 {
   if (_position != string::npos)
   {

+ 2 - 2
source/ls-std/io/section-pair/serialization/SerializableSectionPairRowSingleValue.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-11
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -25,7 +25,7 @@ using std::string;
 
 SerializableSectionPairRowSingleValue::SerializableSectionPairRowSingleValue(const SerializableSectionPairParameter &_parameter) : Class("SerializableSectionPairRowSingleValue"), parameter(_parameter)
 {
-  string message = this->getClassName() + ": model reference is null!";
+  const string message = this->getClassName() + ": model reference is null!";
   NullPointerArgumentEvaluator{_parameter.getValue(), message}.evaluate();
 }
 

+ 19 - 19
source/ls-std/io/section-pair/serialization/SerializableSectionPairSection.cpp

@@ -31,7 +31,7 @@ using std::string_view;
 
 SerializableSectionPairSection::SerializableSectionPairSection(const SerializableSectionPairParameter &_parameter) : Class("SerializableSectionPairSection"), parameter(_parameter)
 {
-  string message = this->getClassName() + ": model reference is null!";
+  const string message = this->getClassName() + ": model reference is null!";
   NullPointerArgumentEvaluator(_parameter.getValue(), message).evaluate();
 }
 
@@ -55,22 +55,22 @@ byte_field SerializableSectionPairSection::marshal()
 void SerializableSectionPairSection::unmarshal(const byte_field &_data)
 {
   SectionPairSectionArgumentEvaluator{_data}.evaluate();
-  size_t sectionHeaderSize = this->_unmarshalSectionHeader(_data);
+  const size_t sectionHeaderSize = this->_unmarshalSectionHeader(_data);
   this->_unmarshalRows(_data.substr(sectionHeaderSize));
 }
 
 byte_field SerializableSectionPairSection::_collectSectionRow(const byte_field &_currentRows, SectionPairRowEnumType &_type) const
 {
   string row{};
-  string newLine = this->parameter.getNewLine();
-  string firstRow = _currentRows.substr(0, _currentRows.find(newLine) + newLine.size());
+  const string newLine = this->parameter.getNewLine();
+  const string firstRow = _currentRows.substr(0, _currentRows.find(newLine) + newLine.size());
 
-  if (SerializableSectionPairSection::_isSingleValueRow(firstRow))
+  if (_isSingleValueRow(firstRow))
   {
-    row = SerializableSectionPairSection::_collectSectionSingleValueRow(firstRow, _type);
+    row = _collectSectionSingleValueRow(firstRow, _type);
   }
 
-  if (SerializableSectionPairSection::_isListValueRow(firstRow))
+  if (_isListValueRow(firstRow))
   {
     row = this->_collectSectionListValueRow(_currentRows, _type);
   }
@@ -83,7 +83,7 @@ byte_field SerializableSectionPairSection::_collectSectionListValueRow(const byt
   byte_field currentRows = _currentRows;
   byte_field currentRow{};
   byte_field row{};
-  string newLine = this->parameter.getNewLine();
+  const string newLine = this->parameter.getNewLine();
   _type = SectionPairRowEnumType::SECTION_PAIR_ROW_LIST_VALUE;
   size_t iterations{};
   bool isStillListRow{};
@@ -115,7 +115,7 @@ byte_field SerializableSectionPairSection::_collectSectionSingleValueRow(const b
   return _firstRow;
 }
 
-size_t SerializableSectionPairSection::_getNthSubStringPosition(string_view _text, string_view _subText)
+size_t SerializableSectionPairSection::_getNthSubStringPosition(const string_view _text, const string_view _subText)
 {
   size_t position = string::npos;
   size_t amount{};
@@ -140,9 +140,9 @@ size_t SerializableSectionPairSection::_getNthSubStringPosition(string_view _tex
 byte_field SerializableSectionPairSection::_getSectionHeader(const byte_field &_data) const
 {
   byte_field sectionHeader{};
-  string newLine = this->parameter.getNewLine();
+  const string newLine = this->parameter.getNewLine();
 
-  if (size_t position = SerializableSectionPairSection::_getNthSubStringPosition(_data, newLine); position != string::npos)
+  if (const size_t position = _getNthSubStringPosition(_data, newLine); position != string::npos)
   {
     sectionHeader = _data.substr(0, position + 2 * newLine.size());
   }
@@ -150,26 +150,26 @@ byte_field SerializableSectionPairSection::_getSectionHeader(const byte_field &_
   return sectionHeader;
 }
 
-byte_field SerializableSectionPairSection::_getSectionId(string_view _sectionHeader)
+byte_field SerializableSectionPairSection::_getSectionId(const string_view _sectionHeader)
 {
   auto sectionId = byte_field{_sectionHeader.substr(_sectionHeader.find('[') + 1)};
   return sectionId.substr(0, sectionId.find(']'));
 }
 
-bool SerializableSectionPairSection::_isListValueRow(string_view _currentRow)
+bool SerializableSectionPairSection::_isListValueRow(const string_view _currentRow)
 {
   return _currentRow.find(':') != string::npos;
 }
 
 bool SerializableSectionPairSection::_isStartingValueRow(const string &_currentRow)
 {
-  bool isSingleValue = SerializableSectionPairSection::_isSingleValueRow(_currentRow);
-  bool isListValue = SerializableSectionPairSection::_isListValueRow(_currentRow);
+  const bool isSingleValue = _isSingleValueRow(_currentRow);
+  const bool isListValue = _isListValueRow(_currentRow);
 
   return isSingleValue || isListValue;
 }
 
-bool SerializableSectionPairSection::_isSingleValueRow(string_view _currentRow)
+bool SerializableSectionPairSection::_isSingleValueRow(const string_view _currentRow)
 {
   return _currentRow.find('=') != string::npos;
 }
@@ -189,13 +189,13 @@ byte_field SerializableSectionPairSection::_marshalRows() const
 
 byte_field SerializableSectionPairSection::_marshalSectionId() const
 {
-  string newLine = this->parameter.getNewLine();
+  const string newLine = this->parameter.getNewLine();
   return newLine + "[" + dynamic_pointer_cast<SectionPairSection>(this->parameter.getValue())->getSectionId() + "]" + newLine + newLine;
 }
 
 void SerializableSectionPairSection::_unmarshalRow(const string &_sectionRow, SectionPairRowEnumType _type) const
 {
-  auto row = make_shared<SectionPairRow>("tmp-dir", _type);
+  const auto row = make_shared<SectionPairRow>("tmp-dir", _type);
   row->reserveNewLine(this->parameter.getNewLine());
   row->unmarshal(_sectionRow);
   dynamic_pointer_cast<SectionPairSection>(this->parameter.getValue())->add(row);
@@ -216,7 +216,7 @@ void SerializableSectionPairSection::_unmarshalRows(const byte_field &_serialize
 
 size_t SerializableSectionPairSection::_unmarshalSectionHeader(const byte_field &_data) const
 {
-  byte_field sectionHeader = this->_getSectionHeader(_data);
+  const byte_field sectionHeader = this->_getSectionHeader(_data);
   dynamic_pointer_cast<SectionPairSection>(this->parameter.getValue())->setSectionId(SerializableSectionPairSection::_getSectionId(sectionHeader));
 
   return sectionHeader.size();

+ 7 - 7
source/ls-std/io/section-pair/validator/SectionPairDocumentValidator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-05-16
+* Changed:         2025-12-21
 *
 * */
 
@@ -26,7 +26,7 @@ SectionPairDocumentValidator::~SectionPairDocumentValidator() noexcept = default
 
 bool SectionPairDocumentValidator::isValid()
 {
-  string validationRegex = SectionPairDocumentValidator::_getValidationRegex();
+  const string validationRegex = _getValidationRegex();
   static auto documentRegex = regex{"^" + validationRegex + "$"};
 
   return regex_match(this->document, documentRegex);
@@ -34,11 +34,11 @@ bool SectionPairDocumentValidator::isValid()
 
 string SectionPairDocumentValidator::_getValidationRegex()
 {
-  string newLine = R"(((\n)|(\r\n)))";
-  string documentHeader = R"((# {1}(section\-pair document))" + newLine + R"())";
-  string section = SectionPairSectionValidator::getValidationRegex();
-  string atLeastOneSection = R"(()" + section + R"())";
-  string optionalSections = R"(()" + section + R"()*)";
+  const string newLine = R"(((\n)|(\r\n)))";
+  const string documentHeader = R"((# {1}(section\-pair document))" + newLine + R"())";
+  const string section = SectionPairSectionValidator::getValidationRegex();
+  const string atLeastOneSection = R"(()" + section + R"())";
+  const string optionalSections = R"(()" + section + R"()*)";
 
   return documentHeader + atLeastOneSection + optionalSections;
 }

+ 5 - 5
source/ls-std/io/section-pair/validator/SectionPairFileExtensionValidator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-02-23
+* Changed:         2025-12-21
 *
 * */
 
@@ -21,10 +21,10 @@ SectionPairFileExtensionValidator::~SectionPairFileExtensionValidator() noexcept
 
 bool SectionPairFileExtensionValidator::isValid()
 {
-  string textFileExtension = ".txt";
-  string sectionPairFileExtension = ".sp";
-  bool endsWithTextFileExtension = this->fileName.rfind(textFileExtension) == (this->fileName.size() - textFileExtension.size());
-  bool endsWithSectionPairFileExtension = this->fileName.rfind(sectionPairFileExtension) == (this->fileName.size() - sectionPairFileExtension.size());
+  const string textFileExtension = ".txt";
+  const string sectionPairFileExtension = ".sp";
+  const bool endsWithTextFileExtension = this->fileName.rfind(textFileExtension) == (this->fileName.size() - textFileExtension.size());
+  const bool endsWithSectionPairFileExtension = this->fileName.rfind(sectionPairFileExtension) == (this->fileName.size() - sectionPairFileExtension.size());
 
   return endsWithTextFileExtension || endsWithSectionPairFileExtension;
 }

+ 3 - 3
source/ls-std/io/section-pair/validator/SectionPairIdentifierValidator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-09
-* Changed:         2023-04-13
+* Changed:         2025-12-21
 *
 * */
 
@@ -25,12 +25,12 @@ SectionPairIdentifierValidator::~SectionPairIdentifierValidator() noexcept = def
 
 string SectionPairIdentifierValidator::getValidationRegex()
 {
-  return SectionPairIdentifierValidator::_getValidationRegex();
+  return _getValidationRegex();
 }
 
 bool SectionPairIdentifierValidator::isValid()
 {
-  static regex identifierRegex("^" + SectionPairIdentifierValidator::_getValidationRegex());
+  static regex identifierRegex("^" + _getValidationRegex());
   return regex_match(this->identifier, identifierRegex);
 }
 

+ 7 - 7
source/ls-std/io/section-pair/validator/SectionPairRowListValueValidator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-19
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -28,12 +28,12 @@ SectionPairRowListValueValidator::~SectionPairRowListValueValidator() noexcept =
 
 string SectionPairRowListValueValidator::getValidationRegex()
 {
-  return SectionPairRowListValueValidator::_getValidationRegex();
+  return _getValidationRegex();
 }
 
 bool SectionPairRowListValueValidator::isValid()
 {
-  string validationRegex = SectionPairRowListValueValidator::_getValidationRegex();
+  const string validationRegex = _getValidationRegex();
   static auto listValueRowRegex = regex{"^" + validationRegex};
 
   return regex_match(this->listValueRow, listValueRowRegex);
@@ -41,10 +41,10 @@ bool SectionPairRowListValueValidator::isValid()
 
 string SectionPairRowListValueValidator::_getValidationRegex()
 {
-  string identifierRegex = SectionPairIdentifierValidator::getValidationRegex();
-  string valueRegex = SectionPairValueValidator::getValidationRegex();
-  string lineBreak = R"(((\n{1})|(\r{1}\n{1})))";
-  string firstLine = R"(((()" + identifierRegex + R"():{1}))" + lineBreak + R"())";
+  const string identifierRegex = SectionPairIdentifierValidator::getValidationRegex();
+  const string valueRegex = SectionPairValueValidator::getValidationRegex();
+  const string lineBreak = R"(((\n{1})|(\r{1}\n{1})))";
+  const string firstLine = R"(((()" + identifierRegex + R"():{1}))" + lineBreak + R"())";
 
   return R"((()" + firstLine + R"(( {2})" + valueRegex + R"()" + lineBreak + R"()){1}(( {2})" + valueRegex + R"()" + lineBreak + R"()*)))";
 }

+ 5 - 5
source/ls-std/io/section-pair/validator/SectionPairRowSingleValueValidator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-19
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -28,12 +28,12 @@ SectionPairRowSingleValueValidator::~SectionPairRowSingleValueValidator() noexce
 
 string SectionPairRowSingleValueValidator::getValidationRegex()
 {
-  return SectionPairRowSingleValueValidator::_getValidationRegex();
+  return _getValidationRegex();
 }
 
 bool SectionPairRowSingleValueValidator::isValid()
 {
-  string validationRegex = SectionPairRowSingleValueValidator::_getValidationRegex();
+  const string validationRegex = _getValidationRegex();
   static auto singleValueRowRegex = regex{"^" + validationRegex};
 
   return regex_match(this->singleValueRow, singleValueRowRegex);
@@ -41,8 +41,8 @@ bool SectionPairRowSingleValueValidator::isValid()
 
 string SectionPairRowSingleValueValidator::_getValidationRegex()
 {
-  string identifierRegex = SectionPairIdentifierValidator::getValidationRegex();
-  string valueRegex = SectionPairValueValidator::getValidationRegex();
+  const string identifierRegex = SectionPairIdentifierValidator::getValidationRegex();
+  const string valueRegex = SectionPairValueValidator::getValidationRegex();
 
   return R"(()" + identifierRegex + R"()={1}()" + valueRegex + R"(){1}($|\n{1}|\r{1}\n{1}))";
 }

+ 5 - 5
source/ls-std/io/section-pair/validator/SectionPairRowValidator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-20
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -27,12 +27,12 @@ SectionPairRowValidator::~SectionPairRowValidator() noexcept = default;
 
 string SectionPairRowValidator::getValidationRegex()
 {
-  return SectionPairRowValidator::_getValidationRegex();
+  return _getValidationRegex();
 }
 
 bool SectionPairRowValidator::isValid()
 {
-  string validationRegex = SectionPairRowValidator::_getValidationRegex();
+  const string validationRegex = _getValidationRegex();
   static auto sectionPairRowRegex = regex{R"(^()" + validationRegex + R"())"};
 
   return regex_match(this->row, sectionPairRowRegex);
@@ -40,8 +40,8 @@ bool SectionPairRowValidator::isValid()
 
 string SectionPairRowValidator::_getValidationRegex()
 {
-  string listValueRowRegex = SectionPairRowListValueValidator::getValidationRegex();
-  string singleValueRowRegex = SectionPairRowSingleValueValidator::getValidationRegex();
+  const string listValueRowRegex = SectionPairRowListValueValidator::getValidationRegex();
+  const string singleValueRowRegex = SectionPairRowSingleValueValidator::getValidationRegex();
 
   return R"(()" + singleValueRowRegex + R"()|()" + listValueRowRegex + R"())";
 }

+ 3 - 3
source/ls-std/io/section-pair/validator/SectionPairSectionValidator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-20
-* Changed:         2023-05-18
+* Changed:         2025-12-21
 *
 * */
 
@@ -29,12 +29,12 @@ SectionPairSectionValidator::~SectionPairSectionValidator() noexcept = default;
 
 string SectionPairSectionValidator::getValidationRegex()
 {
-  return SectionPairSectionValidator::_getValidationRegex();
+  return _getValidationRegex();
 }
 
 bool SectionPairSectionValidator::isValid()
 {
-  string validationRegex = SectionPairSectionValidator::_getValidationRegex();
+  const string validationRegex = _getValidationRegex();
   static auto sectionRegex = regex{"^" + validationRegex};
 
   return regex_match(this->section, sectionRegex);

+ 4 - 5
source/ls-std/io/section-pair/validator/SectionPairValueValidator.cpp

@@ -3,11 +3,10 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-09
-* Changed:         2023-06-06
+* Changed:         2025-12-21
 *
 * */
 
-#include <ls-std/io/NewLine.hpp>
 #include <ls-std/io/section-pair/validator/SectionPairValueValidator.hpp>
 #include <regex>
 
@@ -26,13 +25,13 @@ SectionPairValueValidator::~SectionPairValueValidator() noexcept = default;
 
 string SectionPairValueValidator::getValidationRegex()
 {
-  return SectionPairValueValidator::_getValidationRegex();
+  return _getValidationRegex();
 }
 
 bool SectionPairValueValidator::isValid()
 {
-  string validationRegex = SectionPairValueValidator::_getValidationRegex();
-  string concatenation = "(^" + validationRegex + ")|(^" + validationRegex + R"(\n{1})|(^)" + validationRegex + R"(\r{1}\n{1}))";
+  const string validationRegex = _getValidationRegex();
+  const string concatenation = "(^" + validationRegex + ")|(^" + validationRegex + R"(\n{1})|(^)" + validationRegex + R"(\r{1}\n{1}))";
   static regex valueRegex{concatenation};
 
   return regex_match(this->value, valueRegex);

+ 6 - 5
source/ls-std/io/xml/XmlDeclaration.cpp

@@ -3,17 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-29
- * Changed:         2023-05-17
+ * Changed:         2025-12-21
  *
  * */
 
 #include <ls-std/io/xml/XmlDeclaration.hpp>
 
+using ls::std::core::Class;
 using ls::std::io::XmlAttribute;
 using ls::std::io::XmlDeclaration;
 using std::string;
 
-XmlDeclaration::XmlDeclaration(const string &_version) : ls::std::core::Class("XmlDeclaration")
+XmlDeclaration::XmlDeclaration(const string &_version) : Class("XmlDeclaration")
 {
   this->version.setValue(_version);
 }
@@ -54,9 +55,9 @@ string XmlDeclaration::toXml() const
 {
   string declaration = "<?xml";
 
-  declaration += XmlDeclaration::_toXmlAttribute(this->version);
-  declaration += XmlDeclaration::_toXmlAttribute(this->encoding);
-  declaration += XmlDeclaration::_toXmlAttribute(this->standalone);
+  declaration += _toXmlAttribute(this->version);
+  declaration += _toXmlAttribute(this->encoding);
+  declaration += _toXmlAttribute(this->standalone);
 
   return declaration + " ?>";
 }

+ 12 - 12
source/ls-std/io/xml/XmlNode.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-24
- * Changed:         2023-05-16
+ * Changed:         2025-12-21
  *
  * */
 
@@ -47,13 +47,13 @@ bool XmlNode::addAttributeAfter(const shared_ptr<XmlAttribute> &_attribute, cons
     {
       if ((*iterator)->getName() == _name)
       {
-        iterator++;
+        ++iterator;
         this->attributes.insert(iterator, _attribute);
         added = true;
         break;
       }
 
-      iterator++;
+      ++iterator;
     }
   }
 
@@ -78,7 +78,7 @@ bool XmlNode::addAttributeBefore(const shared_ptr<XmlAttribute> &_attribute, con
         break;
       }
 
-      iterator++;
+      ++iterator;
     }
   }
 
@@ -126,13 +126,13 @@ bool XmlNode::addChildAfter(const shared_ptr<XmlNode> &_child, const shared_ptr<
     {
       if (*iterator == _search)
       {
-        iterator++;
+        ++iterator;
         this->children.insert(iterator, _child);
         added = true;
         break;
       }
 
-      iterator++;
+      ++iterator;
     }
   }
 
@@ -157,7 +157,7 @@ bool XmlNode::addChildBefore(const shared_ptr<XmlNode> &_child, const shared_ptr
         break;
       }
 
-      iterator++;
+      ++iterator;
     }
   }
 
@@ -242,7 +242,7 @@ bool XmlNode::hasChild(const shared_ptr<XmlNode> &_child)
 
 bool XmlNode::removeFirstAttribute()
 {
-  bool isValidOperation = !this->attributes.empty();
+  const bool isValidOperation = !this->attributes.empty();
 
   if (isValidOperation)
   {
@@ -254,7 +254,7 @@ bool XmlNode::removeFirstAttribute()
 
 bool XmlNode::removeLastAttribute()
 {
-  bool isValidOperation = !this->attributes.empty();
+  const bool isValidOperation = !this->attributes.empty();
 
   if (isValidOperation)
   {
@@ -266,7 +266,7 @@ bool XmlNode::removeLastAttribute()
 
 bool XmlNode::removeFirstChild()
 {
-  bool isValidOperation = !this->children.empty();
+  const bool isValidOperation = !this->children.empty();
 
   if (isValidOperation)
   {
@@ -278,7 +278,7 @@ bool XmlNode::removeFirstChild()
 
 bool XmlNode::removeLastChild()
 {
-  bool isValidOperation = !this->children.empty();
+  const bool isValidOperation = !this->children.empty();
 
   if (isValidOperation)
   {
@@ -331,7 +331,7 @@ void XmlNode::_assignValue(const string &_value)
   this->value = _value;
 }
 
-string XmlNode::_getTab(uint8_t _tabSize)
+string XmlNode::_getTab(const uint8_t _tabSize)
 {
   string tab{};
 

+ 45 - 45
source/ls-std/io/xml/XmlParser.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2023-05-16
+ * Changed:         2025-12-21
  *
  * */
 
@@ -56,15 +56,15 @@ void XmlParser::setDocument(const shared_ptr<XmlDocument> &_document)
 
 pair<string, string> XmlParser::_readAttribute_(const byte_field &_data)
 {
-  return XmlParser::_parseAttribute(_data);
+  return _parseAttribute(_data);
 }
 
 list<pair<string, string>> XmlParser::_readAttributes_(byte_field _data)
 {
-  return XmlParser::_parseAttributes(::move(_data));
+  return _parseAttributes(::move(_data));
 }
 
-void XmlParser::_analyze(const byte_field &_data, string::size_type _index)
+void XmlParser::_analyze(const byte_field &_data, const string::size_type _index)
 {
   this->_isDeclaration(_data, _index);
   this->_isClosingTag(_data, _index);
@@ -78,7 +78,7 @@ void XmlParser::_assignDocument(const shared_ptr<XmlDocument> &_document)
   this->document = _document;
 }
 
-bool XmlParser::_contains(string_view _text, string_view _searchText)
+bool XmlParser::_contains(const string_view _text, const string_view _searchText)
 {
   return _text.find(_searchText) != string::npos;
 }
@@ -86,21 +86,21 @@ bool XmlParser::_contains(string_view _text, string_view _searchText)
 shared_ptr<XmlDeclaration> XmlParser::_createDeclaration(const list<pair<string, string>> &_attributes)
 {
   auto declaration = make_shared<XmlDeclaration>("1.0");
-  pair<string, string> attribute = XmlParser::_findAttribute(_attributes, "version");
+  pair<string, string> attribute = _findAttribute(_attributes, "version");
 
   if (!attribute.first.empty())
   {
     declaration->setVersion(attribute.second);
   }
 
-  attribute = XmlParser::_findAttribute(_attributes, "encoding");
+  attribute = _findAttribute(_attributes, "encoding");
 
   if (!attribute.first.empty())
   {
     declaration->setEncoding(attribute.second);
   }
 
-  attribute = XmlParser::_findAttribute(_attributes, "standalone");
+  attribute = _findAttribute(_attributes, "standalone");
 
   if (!attribute.first.empty())
   {
@@ -110,7 +110,7 @@ shared_ptr<XmlDeclaration> XmlParser::_createDeclaration(const list<pair<string,
   return declaration;
 }
 
-shared_ptr<XmlNode> XmlParser::_createNode(const list<pair<string, string>> &_attributes, string_view _name)
+shared_ptr<XmlNode> XmlParser::_createNode(const list<pair<string, string>> &_attributes, const string_view _name)
 {
   auto node = make_shared<XmlNode>(string{_name});
   shared_ptr<XmlAttribute> attribute{};
@@ -125,7 +125,7 @@ shared_ptr<XmlNode> XmlParser::_createNode(const list<pair<string, string>> &_at
   return node;
 }
 
-bool XmlParser::_endsWith(string_view _text, string_view _ending)
+bool XmlParser::_endsWith(const string_view _text, const string_view _ending)
 {
   return _text.rfind(_ending) == (_text.size() - _ending.size());
 }
@@ -141,7 +141,7 @@ size_t XmlParser::_findAttributeEndPosition(const byte_field &_data)
   string::size_type position = string::npos;
   string::size_type counter{};
 
-  for (char letter : _data)
+  for (const char letter : _data)
   {
     if (letter == '"')
     {
@@ -159,11 +159,11 @@ size_t XmlParser::_findAttributeEndPosition(const byte_field &_data)
   return position;
 }
 
-byte_field XmlParser::_getNextTagString(string_view _data, string::size_type _index)
+byte_field XmlParser::_getNextTagString(const string_view _data, const string::size_type _index)
 {
   byte_field tag{};
 
-  if (size_t closingCharacterPosition = _index + _data.substr(_index).find('>'); closingCharacterPosition != string::npos)
+  if (const size_t closingCharacterPosition = _index + _data.substr(_index).find('>'); closingCharacterPosition != string::npos)
   {
     tag = _data.substr(_index, (closingCharacterPosition - _index) + 1);
   }
@@ -171,7 +171,7 @@ byte_field XmlParser::_getNextTagString(string_view _data, string::size_type _in
   return tag;
 }
 
-void XmlParser::_isClosingTag(string_view _data, string::size_type _index)
+void XmlParser::_isClosingTag(const string_view _data, const string::size_type _index)
 {
   if (this->mode == XmlParseMode::XML_PARSE_MODE_ANALYZE && _data.substr(_index, 2) == "</")
   {
@@ -179,7 +179,7 @@ void XmlParser::_isClosingTag(string_view _data, string::size_type _index)
   }
 }
 
-void XmlParser::_isDeclaration(string_view _data, string::size_type _index)
+void XmlParser::_isDeclaration(const string_view _data, const string::size_type _index)
 {
   if (_data.substr(_index, 5) == "<?xml")
   {
@@ -187,7 +187,7 @@ void XmlParser::_isDeclaration(string_view _data, string::size_type _index)
   }
 }
 
-void XmlParser::_isOpeningTag(string_view _data, string::size_type _index)
+void XmlParser::_isOpeningTag(const string_view _data, const string::size_type _index)
 {
   if (this->mode == XmlParseMode::XML_PARSE_MODE_ANALYZE && _data.substr(_index, 1) == "<")
   {
@@ -195,18 +195,18 @@ void XmlParser::_isOpeningTag(string_view _data, string::size_type _index)
   }
 }
 
-void XmlParser::_isValue(const byte_field &_data, string::size_type _index)
+void XmlParser::_isValue(const byte_field &_data, const string::size_type _index)
 {
   if (this->mode == XmlParseMode::XML_PARSE_MODE_ANALYZE)
   {
-    string::size_type end = _data.substr(_index).find('<');
-    bool isValue = _data[_index - 1] == '>' && end != string::npos && end > 0;
+    const string::size_type end = _data.substr(_index).find('<');
+    const bool isValue = _data[_index - 1] == '>' && end != string::npos && end > 0; // kept as dedicated variable for readability
 
     if (isValue)
     {
-      string value{_data.substr(_index, end)};
+      const string value{_data.substr(_index, end)};
 
-      if (!XmlParser::_contains(string_view{value}, string_view{"\n"}) && !XmlParser::_contains(string_view{value}, string_view{"\r\n"}))
+      if (!_contains(string_view{value}, string_view{"\n"}) && !_contains(string_view{value}, string_view{"\r\n"}))
       {
         this->mode = XmlParseMode::XML_PARSE_MODE_VALUE;
       }
@@ -225,11 +225,11 @@ void XmlParser::_mergeNodes()
   this->document->setRootElement(this->parseParameters.front().getNode());
 }
 
-void XmlParser::_mergeChildrenToParentNode(const shared_ptr<XmlNode> &_parent, list<XmlParseParameter>::iterator &_iterator, uint8_t _parentLevel)
+void XmlParser::_mergeChildrenToParentNode(const shared_ptr<XmlNode> &_parent, list<XmlParseParameter>::iterator &_iterator, const uint8_t _parentLevel)
 {
   do
   {
-    _iterator++;
+    ++_iterator;
 
     if (_iterator == this->parseParameters.end())
     {
@@ -248,7 +248,7 @@ void XmlParser::_mergeChildrenToParentNode(const shared_ptr<XmlNode> &_parent, l
 void XmlParser::_mergeNodesOnCurrentLevel()
 {
   auto iterator = this->parseParameters.begin();
-  uint8_t parentLevel = this->maxLevel - 1;
+  const uint8_t parentLevel = this->maxLevel - 1;
 
   while (iterator != this->parseParameters.end())
   {
@@ -258,7 +258,7 @@ void XmlParser::_mergeNodesOnCurrentLevel()
     }
     else
     {
-      iterator++;
+      ++iterator;
     }
   }
 }
@@ -294,41 +294,41 @@ list<pair<string, string>> XmlParser::_parseAttributes(byte_field _data)
       position = _data.find(' ') + 1;
     } while (_data[position] == ' ');
 
-    if (_data.size() <= 3 && XmlParser::_endsWith(string_view{_data}, ">"))
+    if (_data.size() <= 3 && _endsWith(string_view{_data}, ">"))
     {
       break;
     }
 
-    string attributeString = _data.substr(position, XmlParser::_findAttributeEndPosition(_data) + 1);
-    attributes.push_back(XmlParser::_parseAttribute(attributeString));
+    string attributeString = _data.substr(position, _findAttributeEndPosition(_data) + 1);
+    attributes.push_back(_parseAttribute(attributeString));
     _data = _data.substr(position + attributeString.size());
   }
 
   return attributes;
 }
 
-size_t XmlParser::_parseClosingTag(const byte_field &_data, string::size_type _index)
+size_t XmlParser::_parseClosingTag(const byte_field &_data, const string::size_type _index)
 {
-  string tagString = XmlParser::_getNextTagString(_data, _index);
+  const string tagString = _getNextTagString(_data, _index);
   this->currentLevel -= 1;
   return tagString.empty() ? _index : _index + (tagString.size() - 1);
 }
 
-size_t XmlParser::_parseDeclaration(const byte_field &_data, string::size_type _index) const
+size_t XmlParser::_parseDeclaration(const byte_field &_data, const string::size_type _index) const
 {
-  string tagString = XmlParser::_getNextTagString(_data, _index);
-  bool isValidTagString = !tagString.empty();
+  const string tagString = _getNextTagString(_data, _index);
+  const bool isValidTagString = !tagString.empty();
 
   if (isValidTagString)
   {
-    shared_ptr<XmlDeclaration> declaration = this->_createDeclaration(XmlParser::_parseAttributes(tagString));
+    const shared_ptr<XmlDeclaration> declaration = this->_createDeclaration(_parseAttributes(tagString));
     this->document->setDeclaration(declaration);
   }
 
   return !isValidTagString ? _index : _index + (tagString.size() - 1);
 }
 
-string::size_type XmlParser::_parseMode(string::size_type _index, const byte_field &_data)
+string::size_type XmlParser::_parseMode(const string::size_type _index, const byte_field &_data)
 {
   string::size_type index = _index;
 
@@ -349,21 +349,21 @@ string::size_type XmlParser::_parseMode(string::size_type _index, const byte_fie
     case XmlParseMode::XML_PARSE_MODE_OPENING_TAG:
     {
       --index;
-      index = XmlParser::_parseOpeningTag(_data, index);
+      index = _parseOpeningTag(_data, index);
       this->mode = XmlParseMode::XML_PARSE_MODE_ANALYZE;
     }
     break;
     case XmlParseMode::XML_PARSE_MODE_VALUE:
     {
       --index;
-      index = XmlParser::_parseValue(_data, index);
+      index = _parseValue(_data, index);
       this->mode = XmlParseMode::XML_PARSE_MODE_ANALYZE;
     }
     break;
     case XmlParseMode::XML_PARSE_MODE_CLOSING_TAG:
     {
       --index;
-      index = XmlParser::_parseClosingTag(_data, index);
+      index = _parseClosingTag(_data, index);
       this->mode = XmlParseMode::XML_PARSE_MODE_ANALYZE;
     }
     break;
@@ -372,21 +372,21 @@ string::size_type XmlParser::_parseMode(string::size_type _index, const byte_fie
   return index;
 }
 
-size_t XmlParser::_parseOpeningTag(const byte_field &_data, string::size_type _index)
+size_t XmlParser::_parseOpeningTag(const byte_field &_data, const string::size_type _index)
 {
-  string tagString{XmlParser::_getNextTagString(_data, _index)};
-  bool isValidTagString = !tagString.empty();
+  const string tagString{_getNextTagString(_data, _index)};
+  const bool isValidTagString = !tagString.empty();
   XmlParseParameter singleParseParameter{};
 
   if (isValidTagString)
   {
-    shared_ptr<XmlNode> node = XmlParser::_createNode(XmlParser::_parseAttributes(tagString), XmlParser::_parseTagName(tagString));
+    const shared_ptr<XmlNode> node = _createNode(_parseAttributes(tagString), _parseTagName(tagString));
 
     singleParseParameter.setLevel(this->currentLevel);
     singleParseParameter.setNode(node);
     this->parseParameters.push_back(singleParseParameter);
 
-    if (!XmlParser::_endsWith(tagString, "/>"))
+    if (!_endsWith(tagString, "/>"))
     {
       this->currentLevel += 1;
       this->_setMaxLevel();
@@ -408,9 +408,9 @@ string_view XmlParser::_parseTagName(string_view _data)
   return _data.substr(1, position - 1);
 }
 
-size_t XmlParser::_parseValue(string_view _data, string::size_type _index)
+size_t XmlParser::_parseValue(const string_view _data, const string::size_type _index) const
 {
-  string_view value = _data.substr(_index, _data.substr(_index).find('<'));
+  const string_view value = _data.substr(_index, _data.substr(_index).find('<'));
   this->parseParameters.back().getNode()->setValue(string{value});
 
   return _index + (value.size() - 1);