projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
087327a
)
[iter] Allow negative step in hb_iota()
author
Behdad Esfahbod
<behdad@behdad.org>
Thu, 9 May 2019 18:20:41 +0000
(11:20 -0700)
committer
Behdad Esfahbod
<behdad@behdad.org>
Thu, 9 May 2019 18:31:13 +0000
(11:31 -0700)
src/hb-iter.hh
patch
|
blob
|
history
diff --git
a/src/hb-iter.hh
b/src/hb-iter.hh
index
1f3c819
..
a998125
100644
(file)
--- a/
src/hb-iter.hh
+++ b/
src/hb-iter.hh
@@
-567,7
+567,7
@@
struct
{
template <typename T = unsigned, typename S = unsigned> hb_counter_iter_t<T, S>
operator () (T start = 0u, S&& step = 1u) const
- { return hb_counter_iter_t<T, S> (start,
hb_int_max
(T), step); }
+ { return hb_counter_iter_t<T, S> (start,
step >= 0 ? hb_int_max (T) : hb_int_min
(T), step); }
}
HB_FUNCOBJ (hb_iota);
struct