Use new helper functions ParseAsArray and ParseAsPairs of InfoStringToStructConverterBase to parse notetracksoundmap and hidetags

This commit is contained in:
Jan
2021-03-26 12:12:32 +01:00
parent aaf350d088
commit 3520a9bd2c
3 changed files with 140 additions and 127 deletions

View File

@ -2,6 +2,7 @@
#include <string>
#include <unordered_set>
#include <utility>
#include "Utils/ClassUtils.h"
#include "InfoString/InfoString.h"
@ -18,6 +19,9 @@ protected:
std::unordered_set<XAssetInfoGeneric*> m_dependencies;
MemoryManager* m_memory;
void* m_structure;
static bool ParseAsArray(const std::string& value, std::vector<std::string>& valueArray);
bool ParseAsPairs(const std::string& value, std::vector<std::pair<std::string, std::string>>& valueArray) const;
bool ConvertString(const std::string& value, size_t offset);
bool ConvertStringBuffer(const std::string& value, size_t offset, size_t bufferSize);