提交 66920a6b 编写于 作者: B Behdad Esfahbod

[iter] Make operator bool explicit

We would need to write:

  for (Iter<T> it (...); bool (t); t++)

instead of:

  for (Iter<T> it (...); t; t++)

But I think it's an improvement in code readability in the long term.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1127
上级 79e21984
......@@ -72,7 +72,7 @@ struct Iter<T *>
array (array_), length (length_) {}
/* Emptiness. */
inline operator bool (void) const { return bool (length); }
explicit inline operator bool (void) const { return bool (length); }
/* Current item. */
inline T &operator * (void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册