mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 17:44:06 +01:00
[iter] Accept iterator, not iterable, in hb_sink()()
This commit is contained in:
1 parent
0f292ea85f
commit
5fa52e62b1
2 files changed
+5
-4
No files matched your search
+4
-4
@@ -371,12 +371,12 @@ struct hb_sink_t
|
||||
{
|
||||
hb_sink_t (Sink&& s) : s (s) {}
|
||||
|
||||
template <typename Iterable,
|
||||
hb_enable_if (hb_is_iterable (Iterable))>
|
||||
template <typename Iter,
|
||||
hb_enable_if (hb_is_iterator (Iter))>
|
||||
void
|
||||
operator () (const Iterable &c) const
|
||||
operator () (Iter it) const
|
||||
{
|
||||
for (auto it = c.iter (); it; ++it)
|
||||
for (; it; ++it)
|
||||
s << *it;
|
||||
}
|
||||
|
||||
|
||||
@@ -145,6 +145,7 @@ main (int argc, char **argv)
|
||||
| hb_filter ()
|
||||
| hb_filter (hb_bool)
|
||||
| hb_filter (hb_bool, hb_identity)
|
||||
| hb_sink (st)
|
||||
;
|
||||
|
||||
t << 1;
|
||||
|
||||
Reference in new issue
Block a user