[pango/harfbuzz-ng] [GDEF] Simplify Device access
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Subject: [pango/harfbuzz-ng] [GDEF] Simplify Device access
- Date: Wed, 20 May 2009 15:28:42 -0400 (EDT)
commit e97278164b1939d4b76128ff8bf520ca02b1debb
Author: Behdad Esfahbod <behdad behdad org>
Date: Wed May 20 00:00:09 2009 -0400
[GDEF] Simplify Device access
---
pango/opentype/hb-ot-layout-gdef-private.h | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/pango/opentype/hb-ot-layout-gdef-private.h b/pango/opentype/hb-ot-layout-gdef-private.h
index ba0eb4c..90993f8 100644
--- a/pango/opentype/hb-ot-layout-gdef-private.h
+++ b/pango/opentype/hb-ot-layout-gdef-private.h
@@ -112,22 +112,16 @@ struct CaretValueFormat3
{
friend struct CaretValue;
- private:
- inline const Device& get_device (void) const
- {
- if (HB_UNLIKELY (!deviceTable)) return Null(Device);
- return (const Device&)*((const char*)this + deviceTable);
- }
-
inline int get_caret_value (int ppem) const
{
- return /* TODO garbage */ (coordinate + get_device().get_delta (ppem)) / ppem;
+ return /* TODO garbage */ (coordinate + (this+deviceTable).get_delta (ppem)) / ppem;
}
private:
USHORT caretValueFormat; /* Format identifier--format = 3 */
SHORT coordinate; /* X or Y value, in design units */
- Offset deviceTable; /* Offset to Device table for X or Y
+ OffsetTo<Device>
+ deviceTable; /* Offset to Device table for X or Y
* value--from beginning of CaretValue
* table */
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]