Adding combined image samplers

This commit is contained in:
Dynamitos
2024-04-26 11:42:28 +02:00
parent 54cd77beb2
commit 93ab9e38f0
9 changed files with 55 additions and 23 deletions
+8
View File
@@ -81,10 +81,18 @@ struct Map : public Tree<K, Pair<K, V>, _KeyFun<K, Pair<K, V>>, Compare, Allocat
{
return Super::remove(key);
}
constexpr bool exists(const key_type& key) const
{
return Super::find(key) != Super::end();
}
constexpr bool exists(const key_type& key)
{
return Super::find(key) != Super::end();
}
constexpr bool contains(const key_type& key) const
{
return exists(key);
}
constexpr bool contains(const key_type& key)
{
return exists(key);
+5 -1
View File
@@ -314,7 +314,7 @@ protected:
constexpr iterator find(const key_type& key) const
{
Node* it = root;
while (!equal(it->data, key))
while (it != nullptr && !equal(it->data, key))
{
if (comp(key, keyFun(it->data)))
{
@@ -325,6 +325,10 @@ protected:
it = it->rightChild;
}
}
if (it == nullptr)
{
return end();
}
return iterator(it);
}
constexpr Pair<iterator, bool> insert(const NodeData& data)