mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:07:34 +00:00
LibGfx: Add fallible ICC::Profile::try_for_each_tag
Similar to13b18a1
ord0f3f3d
.
This commit is contained in:
parent
0f0694edb1
commit
8179327068
1 changed files with 8 additions and 0 deletions
|
@ -247,6 +247,14 @@ public:
|
|||
callback(tag.key, tag.value);
|
||||
}
|
||||
|
||||
template<FallibleFunction<TagSignature, NonnullRefPtr<TagData>> Callback>
|
||||
ErrorOr<void> try_for_each_tag(Callback&& callback) const
|
||||
{
|
||||
for (auto const& tag : m_tag_table)
|
||||
TRY(callback(tag.key, tag.value));
|
||||
return {};
|
||||
}
|
||||
|
||||
size_t tag_count() const { return m_tag_table.size(); }
|
||||
|
||||
// Only versions 2 and 4 are in use.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue