summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-07-17 19:49:21 +0200
committerljfa-ag <ljfa-ag@web.de>2015-07-17 19:49:21 +0200
commitf5fc52e27b54a47ee86edfe9ba002426a4833d3d (patch)
tree962bed2103c9b1ded57c69d7bbcf88f9f670c584 /src
parent578dd6911154a836cda92b5d2cef15efae7c96b9 (diff)
downloadProject-Tick-f5fc52e27b54a47ee86edfe9ba002426a4833d3d.tar.gz
Project-Tick-f5fc52e27b54a47ee86edfe9ba002426a4833d3d.zip
Overload has_key with version that takes tag_type
Diffstat (limited to 'src')
-rw-r--r--src/tag_compound.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tag_compound.cpp b/src/tag_compound.cpp
index 78a5c46fc6..48f4f42239 100644
--- a/src/tag_compound.cpp
+++ b/src/tag_compound.cpp
@@ -72,6 +72,12 @@ bool tag_compound::has_key(const std::string& key) const
return tags.find(key) != tags.end();
}
+bool tag_compound::has_key(const std::string& key, tag_type type) const
+{
+ auto it = tags.find(key);
+ return it != tags.end() && it->second.get_type() == type;
+}
+
size_t tag_compound::size() const
{
return tags.size();