[pango/harfbuzz-ng: 38/57] [HB] Optimize sanitize()
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pango/harfbuzz-ng: 38/57] [HB] Optimize sanitize()
- Date: Tue, 4 Aug 2009 20:04:33 +0000 (UTC)
commit 15e1f268f52a61ebdcdcf0d3c7cd643f897cdcde
Author: Behdad Esfahbod <behdad behdad org>
Date: Tue Aug 4 02:10:48 2009 -0400
[HB] Optimize sanitize()
pango/opentype/hb-open-types-private.hh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/pango/opentype/hb-open-types-private.hh b/pango/opentype/hb-open-types-private.hh
index 3d57122..b3d7541 100644
--- a/pango/opentype/hb-open-types-private.hh
+++ b/pango/opentype/hb-open-types-private.hh
@@ -376,11 +376,12 @@ struct ArrayOf
inline bool sanitize (SANITIZE_ARG_DEF) {
if (!(SANITIZE (len) && SANITIZE_GET_SIZE())) return false;
- /* XXX For non-recursive types, this is too much overhead */
+ /* Note; for non-recursive types, this is not much needed
unsigned int count = len;
for (unsigned int i = 0; i < count; i++)
if (!SANITIZE (array[i]))
return false;
+ */
}
USHORT len;
@@ -403,9 +404,11 @@ struct HeadlessArrayOf
inline bool sanitize (SANITIZE_ARG_DEF) {
if (!(SANITIZE_SELF () && SANITIZE_GET_SIZE())) return false;
unsigned int count = len ? len - 1 : 0;
+ /* Note; for non-recursive types, this is not much needed
for (unsigned int i = 0; i < count; i++)
if (!SANITIZE (array[i]))
return false;
+ */
}
USHORT len;
@@ -427,9 +430,11 @@ struct LongArrayOf
inline bool sanitize (SANITIZE_ARG_DEF) {
if (!(SANITIZE_SELF () && SANITIZE_GET_SIZE())) return false;
unsigned int count = len;
+ /* Note; for non-recursive types, this is not much needed
for (unsigned int i = 0; i < count; i++)
if (!SANITIZE (array[i]))
return false;
+ */
}
ULONG len;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]