mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 17:44:06 +01:00
[sanitize] Speed up check_struct on x64
This commit is contained in:
1 parent
fb02f4a897
commit
253ec08b3d
1 file changed
+6
-1
+6
-1
@@ -382,7 +382,12 @@ struct hb_sanitize_context_t :
|
||||
|
||||
template <typename Type>
|
||||
bool check_struct (const Type *obj) const
|
||||
{ return likely (this->check_range_fast (obj, obj->min_size)); }
|
||||
{
|
||||
if (sizeof (uintptr_t) == sizeof (uint32_t))
|
||||
return likely (this->check_range_fast (obj, obj->min_size));
|
||||
else
|
||||
return likely (this->check_point ((const char *) obj + obj->min_size));
|
||||
}
|
||||
|
||||
bool may_edit (const void *base, unsigned int len)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user