repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 43e54b8071c7e21e57da279b9386240c77a32b12:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 43e54b8071c7e21e57da279b9386240c77a32b12
Author: Marc Lehmann 
Date:   Sat May 22 23:55:56 2010 +0000

    cleanup

diff --git a/src/rxvtfont.C b/src/rxvtfont.C
index 3669949499e7d01d23e5b80823774c09bb2f5001..
index ..0f3761f255932d750991cbb12a3a17462aeb1aa0 100644
--- a/src/rxvtfont.C
+++ b/src/rxvtfont.C
@@ -1484,7 +1484,7 @@ rxvt_fontset::clear ()
   force_prop = false;

   for (rxvt_font **i = fonts.begin (); i != fonts.end (); i++)
-    FONT_UNREF (*i);
+    (*i)->unref ();

   for (pagemap **p = fmap.begin (); p != fmap.end (); p++)
     delete *p;
diff --git a/src/rxvtfont.h b/src/rxvtfont.h
index 123d5cc1b202eb101677f09f9c909977779b1304..
index ..9c504a5da19c154e45ff12a1d7369c537b1c74d6 100644
--- a/src/rxvtfont.h
+++ b/src/rxvtfont.h
@@ -58,9 +58,13 @@ struct rxvt_font
                      int x, int y,
                      const text_t *text, int len,
                      int fg, int bg) = 0;
-};

-#define FONT_UNREF(f) do { (f)->clear (); delete (f); } while (0)
+  void unref ()
+  {
+    clear ();
+    delete this;
+  }
+};

 struct rxvt_fallback_font;

-----END OF PAGE-----