From 865deeb3be1cb40efe3d7c42db48b0cdf977de47 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 21 Dec 2018 17:35:58 -0500 Subject: [PATCH] Adjust internal header dependencies --- src/hb-array.hh | 5 ++++- src/hb-dsalgs.hh | 1 - src/hb-iter.hh | 1 + src/hb-vector.hh | 1 + src/hb.hh | 15 +++++++++------ src/test-iter.cc | 1 + src/test-unicode-ranges.cc | 1 + 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/hb-array.hh b/src/hb-array.hh index 3cce512cd..a07560fd8 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -28,13 +28,16 @@ #define HB_ARRAY_HH #include "hb.hh" +#include "hb-dsalgs.hh" +#include "hb-iter.hh" +#include "hb-null.hh" template struct hb_sorted_array_t; template -struct hb_array_t +struct hb_array_t// : hb_iter_t, Type> { typedef Type item_t; enum { item_size = hb_static_size (Type) }; diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh index 48ce9897d..aa1c521bd 100644 --- a/src/hb-dsalgs.hh +++ b/src/hb-dsalgs.hh @@ -28,7 +28,6 @@ #define HB_DSALGS_HH #include "hb.hh" - #include "hb-null.hh" diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 876793680..ffb6c4912 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -28,6 +28,7 @@ #define HB_ITER_HH #include "hb.hh" +#include "hb-null.hh" /* Unified iterator object. diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 4e962d2ef..a9fa123e9 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -29,6 +29,7 @@ #include "hb.hh" #include "hb-array.hh" +#include "hb-null.hh" template diff --git a/src/hb.hh b/src/hb.hh index dbfcc2091..18f4e5c31 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -545,14 +545,17 @@ template struct hb_remove_pointer { typedef T value; }; #define hb_remove_pointer(T) hb_remove_pointer::value -/* Headers we include for everyone. Keep sorted. They express dependency amongst - * themselves, but no other file should include them.*/ +/* Headers we include for everyone. Keep topologically sorted by dependency. + * They express dependency amongst themselves, but no other file should include + * them directly.*/ #include "hb-atomic.hh" -#include "hb-debug.hh" -#include "hb-dsalgs.hh" -#include "hb-iter.hh" #include "hb-mutex.hh" #include "hb-null.hh" -#include "hb-object.hh" +#include "hb-dsalgs.hh" // Requires: hb-null +#include "hb-iter.hh" // Requires: hb-null +#include "hb-debug.hh" // Requires: hb-atomic hb-dsalgs +#include "hb-array.hh" // Requires: hb-dsalgs hb-iter hb-null +#include "hb-vector.hh" // Requires: hb-array hb-null +#include "hb-object.hh" // Requires: hb-atomic hb-mutex hb-vector #endif /* HB_HH */ diff --git a/src/test-iter.cc b/src/test-iter.cc index 4daa971d5..5cd0cc60a 100644 --- a/src/test-iter.cc +++ b/src/test-iter.cc @@ -24,6 +24,7 @@ * Google Author(s): Behdad Esfahbod */ +#include "hb.hh" #include "hb-iter.hh" #include "hb-array.hh" diff --git a/src/test-unicode-ranges.cc b/src/test-unicode-ranges.cc index d5d39b957..0eef8c24b 100644 --- a/src/test-unicode-ranges.cc +++ b/src/test-unicode-ranges.cc @@ -24,6 +24,7 @@ * Google Author(s): Garret Rieger */ +#include "hb.hh" #include "hb-ot-os2-unicode-ranges.hh" static void