textures.ini loader logging improvement

This commit is contained in:
Henrik Rydgård committed 2023-08-28 16:34:58 +02:00
1 parent 5c42aa07fc
commit 412c4547cd
3 files changed
+19 -3

No files matched your search

+11
View File
@@ -403,6 +403,17 @@ std::map<std::string, std::string> Section::ToMap() const
return outMap;
}
std::vector<std::pair<std::string, std::string>> Section::ToVec() const {
std::vector<std::pair<std::string, std::string>> outVec;
for (std::vector<std::string>::const_iterator iter = lines.begin(); iter != lines.end(); ++iter)
{
std::string lineKey, lineValue;
if (ParseLine(*iter, &lineKey, &lineValue, NULL)) {
outVec.push_back(std::pair<std::string, std::string>(lineKey, lineValue));
}
}
return outVec;
}
bool Section::Delete(const char *key)
{
+1
View File
@@ -28,6 +28,7 @@ public:
void Clear();
std::map<std::string, std::string> ToMap() const;
std::vector<std::pair<std::string, std::string>> ToVec() const; // Often more appropriate than ToMap() - doesn't artifically remove duplicates.
std::string *GetLine(const char* key, std::string* valueOut, std::string* commentOut);
const std::string *GetLine(const char* key, std::string* valueOut, std::string* commentOut) const;