Minor
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 06:15:58 +0000 (23:15 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 06:16:14 +0000 (23:16 -0700)
14 files changed:
src/hb-atomic.hh
src/hb-debug.hh
src/hb-font.cc
src/hb-ot-font.cc
src/hb-ot-layout.cc
src/hb-ot-name-table.hh
src/hb-ot-shape-complex-arabic.cc
src/hb-ot-shape-complex-hebrew.cc
src/hb-ot-shape-complex-thai.cc
src/hb-ot-shape-complex-vowel-constraints.cc
src/hb-ot-shape-fallback.cc
src/hb-subset.cc
src/hb-warning.cc
src/hb.hh

index 8307a54..a82ce6c 100644 (file)
@@ -107,7 +107,7 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N)
 
 static inline void _hb_memory_barrier ()
 {
-#if !defined(MemoryBarrier)
+#ifndef MemoryBarrier
   /* MinGW has a convoluted history of supporting MemoryBarrier. */
   LONG dummy = 0;
   InterlockedExchange (&dummy, 1);
index a03170b..e6d06e3 100644 (file)
@@ -63,7 +63,7 @@ extern HB_INTERNAL hb_atomic_int_t _hb_options;
 static inline hb_options_t
 hb_options ()
 {
-#if defined(HB_NO_GETENV)
+#ifdef HB_NO_GETENV
   return hb_options_t ();
 #endif
   /* Make a local copy, so we can access bitfield threadsafely. */
index 20daefd..c00f333 100644 (file)
@@ -1347,7 +1347,7 @@ hb_font_create (hb_face_t *face)
 {
   hb_font_t *font = _hb_font_create (face);
 
-#if !defined(HB_NO_OT_FONT)
+#ifndef HB_NO_OT_FONT
   /* Install our in-house, very lightweight, funcs. */
   hb_ot_font_set_funcs (font);
 #endif
index 77e42cc..5051fa0 100644 (file)
@@ -183,13 +183,13 @@ hb_ot_get_glyph_extents (hb_font_t *font,
   bool ret = ot_face->sbix->get_extents (font, glyph, extents);
   if (!ret)
     ret = ot_face->glyf->get_extents (glyph, extents);
-#if !defined(HB_NO_OT_FONT_CFF)
+#ifndef HB_NO_OT_FONT_CFF
   if (!ret)
     ret = ot_face->cff1->get_extents (glyph, extents);
   if (!ret)
     ret = ot_face->cff2->get_extents (font, glyph, extents);
 #endif
-#if !defined(HB_NO_OT_FONT_BITMAP)
+#ifndef HB_NO_OT_FONT_BITMAP
   if (!ret)
     ret = ot_face->CBDT->get_extents (font, glyph, extents);
 #endif
index 817b28e..cd603d8 100644 (file)
@@ -138,7 +138,7 @@ bool
 OT::GDEF::is_blacklisted (hb_blob_t *blob,
                          hb_face_t *face) const
 {
-#if defined(HB_NO_OT_LAYOUT_BLACKLIST)
+#ifdef HB_NO_OT_LAYOUT_BLACKLIST
   return false;
 #endif
   /* The ugly business of blacklisting individual fonts' tables happen here!
@@ -384,7 +384,7 @@ bool
 OT::GSUB::is_blacklisted (hb_blob_t *blob HB_UNUSED,
                          hb_face_t *face) const
 {
-#if defined(HB_NO_OT_LAYOUT_BLACKLIST)
+#ifdef HB_NO_OT_LAYOUT_BLACKLIST
   return false;
 #endif
   /* Mac OS X prefers morx over GSUB.  It also ships with various Indic fonts,
@@ -412,7 +412,7 @@ bool
 OT::GPOS::is_blacklisted (hb_blob_t *blob HB_UNUSED,
                          hb_face_t *face HB_UNUSED) const
 {
-#if defined(HB_NO_OT_LAYOUT_BLACKLIST)
+#ifdef HB_NO_OT_LAYOUT_BLACKLIST
   return false;
 #endif
   return false;
index f2f5a1a..e7e32ec 100644 (file)
@@ -60,7 +60,7 @@ struct NameRecord
     if (p == 1)
       return _hb_ot_name_language_for_mac_code (l);
 
-#if !defined(HB_NO_NAME_TABLE_AAT)
+#ifndef HB_NO_NAME_TABLE_AAT
     if (p == 0)
       return _hb_aat_language_get (face, l);
 #endif
index 4daf2a6..3212e0c 100644 (file)
@@ -383,7 +383,7 @@ arabic_fallback_shape (const hb_ot_shape_plan_t *plan,
                       hb_font_t *font,
                       hb_buffer_t *buffer)
 {
-#if defined(HB_NO_OT_SHAPE_COMPLEX_ARABIC_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_COMPLEX_ARABIC_FALLBACK
   return;
 #endif
 
index db88018..1498973 100644 (file)
@@ -70,7 +70,7 @@ compose_hebrew (const hb_ot_shape_normalize_context_t *c,
 
   bool found = (bool) c->unicode->compose (a, b, ab);
 
-#if defined(HB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK
   return found;
 #endif
 
index 130ea1c..22d4aa3 100644 (file)
@@ -218,7 +218,7 @@ do_thai_pua_shaping (const hb_ot_shape_plan_t *plan HB_UNUSED,
                     hb_buffer_t              *buffer,
                     hb_font_t                *font)
 {
-#if defined(HB_NO_OT_SHAPE_COMPLEX_THAI_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_COMPLEX_THAI_FALLBACK
   return;
 #endif
 
index 2eb313a..912ee35 100644 (file)
@@ -34,7 +34,7 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
                                       hb_buffer_t              *buffer,
                                       hb_font_t                *font HB_UNUSED)
 {
-#if defined(HB_NO_OT_SHAPE_COMPLEX_VOWEL_CONSTRAINTS)
+#ifdef HB_NO_OT_SHAPE_COMPLEX_VOWEL_CONSTRAINTS
   return;
 #endif
   if (buffer->flags & HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE)
index b10eec6..42b728f 100644 (file)
@@ -166,7 +166,7 @@ _hb_ot_shape_fallback_mark_position_recategorize_marks (const hb_ot_shape_plan_t
                                                        hb_font_t *font HB_UNUSED,
                                                        hb_buffer_t  *buffer)
 {
-#if defined(HB_NO_OT_SHAPE_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_FALLBACK
   return;
 #endif
 
@@ -438,7 +438,7 @@ _hb_ot_shape_fallback_mark_position (const hb_ot_shape_plan_t *plan,
                                     hb_buffer_t  *buffer,
                                     bool adjust_offsets_when_zeroing)
 {
-#if defined(HB_NO_OT_SHAPE_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_FALLBACK
   return;
 #endif
 
@@ -481,7 +481,7 @@ _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan,
                            hb_font_t *font,
                            hb_buffer_t *buffer)
 {
-#if defined(HB_NO_OT_SHAPE_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_FALLBACK
   return;
 #endif
 
index f4fc771..aa6934b 100644 (file)
@@ -206,7 +206,7 @@ _subset_table (hb_subset_plan_t *plan,
       result = _subset<const OT::VORG> (plan);
       break;
 
-#if !defined(HB_NO_SUBSET_LAYOUT)
+#ifndef HB_NO_SUBSET_LAYOUT
     case HB_OT_TAG_GDEF:
       result = _subset2<const OT::GDEF> (plan);
       break;
@@ -247,7 +247,7 @@ _should_drop_table (hb_subset_plan_t *plan, hb_tag_t tag)
     case HB_OT_TAG_GDEF:
     case HB_OT_TAG_GPOS:
     case HB_OT_TAG_GSUB:
-#if defined(HB_NO_SUBSET_LAYOUT)
+#ifdef HB_NO_SUBSET_LAYOUT
       return true;
 #endif
       return plan->drop_layout;
index 9fb4100..60c7445 100644 (file)
 
 #include "hb.hh"
 
-#if defined(HB_ATOMIC_INT_NIL)
+#ifdef HB_ATOMIC_INT_NIL
 #error "Could not find any system to define atomic_int macros, library WILL NOT be thread-safe"
 #error "Check hb-atomic.hh for possible resolutions."
 #endif
 
-#if defined(HB_MUTEX_IMPL_NIL)
+#ifdef HB_MUTEX_IMPL_NIL
 #error "Could not find any system to define mutex macros, library WILL NOT be thread-safe"
 #error "Check hb-mutex.hh for possible resolutions."
 #endif
index 3d4b180..0aa55af 100644 (file)
--- a/src/hb.hh
+++ b/src/hb.hh
@@ -30,7 +30,7 @@
 #define HB_HH
 
 #ifndef HB_NO_PRAGMA_GCC_DIAGNOSTIC
-#if defined(_MSC_VER)
+#ifdef _MSC_VER
 #pragma warning( disable: 4068 ) /* Unknown pragma */
 #endif
 #if defined(__GNUC__) || defined(__clang__)
@@ -203,7 +203,7 @@ extern "C" void  hb_free_impl(void *ptr);
 #define realloc hb_realloc_impl
 #define free hb_free_impl
 
-#if defined(hb_memalign_impl)
+#ifdef hb_memalign_impl
 extern "C" int hb_memalign_impl(void **memptr, size_t alignment, size_t size);
 #define posix_memalign hb_memalign_impl
 #else
@@ -315,7 +315,7 @@ extern "C" int hb_memalign_impl(void **memptr, size_t alignment, size_t size);
 #  define HB_FALLTHROUGH /* FALLTHROUGH */
 #endif
 
-#if defined(__clang__)
+#ifdef __clang__
 /* Disable certain sanitizer errors. */
 /* https://github.com/harfbuzz/harfbuzz/issues/1247 */
 #define HB_NO_SANITIZE_SIGNED_INTEGER_OVERFLOW __attribute__((no_sanitize("signed-integer-overflow")))
@@ -445,12 +445,12 @@ static_assert ((sizeof (hb_var_int_t) == 4), "");
  *
  * https://bugs.chromium.org/p/chromium/issues/detail?id=860184
  */
-#if !defined(HB_VECTOR_SIZE)
+#ifndef HB_VECTOR_SIZE
 #  define HB_VECTOR_SIZE 0
 #endif
 
 /* The `vector_size' attribute was introduced in gcc 3.1. */
-#if !defined(HB_VECTOR_SIZE)
+#ifndef HB_VECTOR_SIZE
 #  if defined( __GNUC__ ) && ( __GNUC__ >= 4 )
 #    define HB_VECTOR_SIZE 128
 #  else