Fix partial tracing debug builds
authorBehdad Esfahbod <behdad@behdad.org>
Fri, 15 Dec 2017 02:15:14 +0000 (18:15 -0800)
committerBehdad Esfahbod <behdad@behdad.org>
Fri, 15 Dec 2017 03:07:17 +0000 (19:07 -0800)
src/hb-debug.hh

index 213e54322850f603b12b87c6c8824f0197739433..6c425f7b9dd5828754ec27531f1e19b5ec79201f 100644 (file)
@@ -220,8 +220,8 @@ template <>
 {}
 
 template <int max_level, typename ret_t>
-struct hb_auto_trace_t {
-
+struct hb_auto_trace_t
+{
   explicit inline hb_auto_trace_t (unsigned int *plevel_,
                                   const char *what_,
                                   const void *obj_,
@@ -269,7 +269,17 @@ struct hb_auto_trace_t {
   bool returned;
 };
 template <typename ret_t> /* Make sure we don't use hb_auto_trace_t when not tracing. */
-struct hb_auto_trace_t<0, ret_t>;
+struct hb_auto_trace_t<0, ret_t>
+{
+  explicit inline hb_auto_trace_t (unsigned int *plevel_,
+                                  const char *what_,
+                                  const void *obj_,
+                                  const char *func,
+                                  const char *message,
+                                  ...) HB_PRINTF_FUNC(6, 7) {}
+
+  inline ret_t ret (ret_t v, unsigned int line HB_UNUSED = 0) { return v; }
+};
 
 /* For disabled tracing; optimize out everything.
  * https://github.com/harfbuzz/harfbuzz/pull/605 */