提交 6cd60c2f 编写于 作者: B Behdad Esfahbod

[array] Return Crap instead of Null if Type is not const

Ouch!
上级 94e72cf1
...@@ -55,7 +55,7 @@ struct hb_array_t ...@@ -55,7 +55,7 @@ struct hb_array_t
Type& operator [] (int i_) const Type& operator [] (int i_) const
{ {
unsigned int i = (unsigned int) i_; unsigned int i = (unsigned int) i_;
if (unlikely (i >= len)) return Null(Type); if (unlikely (i >= len)) return CrapOrNull(Type);
return arrayZ[i]; return arrayZ[i];
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册