From 73755ec720254766e4504ac72684be5e357b6939 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Tue, 5 Feb 2013 14:11:09 +0100 Subject: [PATCH] Avoid one string concatenation in debug printing function. --- src/tree.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tree.ml b/src/tree.ml index f502c7e..71f9a98 100644 --- a/src/tree.ml +++ b/src/tree.ml @@ -14,7 +14,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) type node = { @@ -65,10 +65,10 @@ struct } let print_node_ptr fmt n = - Format.fprintf fmt "%s" - (if n == nil then "" else - if n == dummy then "" else - "") + Format.fprintf fmt "<%s>" + (if n == nil then "NIL" else + if n == dummy then "DUMMY" else + "NODE " ^ string_of_int n.preorder) let debug_node fmt node = Format.fprintf fmt "{ tag=%s; preorder=%i; data=%s; first_child=%a; next_sibling=%a; parent=%a }" -- 2.17.1