From c105738fa36bb2400adc47399c5b878d252d1c86 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 28 May 2015 16:08:46 +0100 Subject: Change LOG() macro to be varadic This changes the LOG macro to be varadic removing the need for all callsites to have double bracketing and allows for future improvement on how we use the logging macros. The callsites were changed with coccinelle and the changes checked by hand. Compile tested for several frontends but not all. A formatting annotation has also been added which allows the compiler to check the parameters and types passed to the logging. --- beos/bitmap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'beos/bitmap.cpp') diff --git a/beos/bitmap.cpp b/beos/bitmap.cpp index 2ed73a4c1..3228770a4 100644 --- a/beos/bitmap.cpp +++ b/beos/bitmap.cpp @@ -377,7 +377,7 @@ nsbeos_bitmap_get_pretile_x(struct bitmap* bitmap) if (!bitmap->pretile_x) { int width = bitmap->primary->Bounds().Width() + 1; int xmult = (MIN_PRETILE_WIDTH + width - 1)/width; - LOG(("Pretiling %p for X*%d", bitmap, xmult)); + LOG("Pretiling %p for X*%d", bitmap, xmult); bitmap->pretile_x = nsbeos_bitmap_generate_pretile(bitmap->primary, xmult, 1); } return bitmap->pretile_x; @@ -396,7 +396,7 @@ nsbeos_bitmap_get_pretile_y(struct bitmap* bitmap) if (!bitmap->pretile_y) { int height = bitmap->primary->Bounds().Height() + 1; int ymult = (MIN_PRETILE_HEIGHT + height - 1)/height; - LOG(("Pretiling %p for Y*%d", bitmap, ymult)); + LOG("Pretiling %p for Y*%d", bitmap, ymult); bitmap->pretile_y = nsbeos_bitmap_generate_pretile(bitmap->primary, 1, ymult); } return bitmap->pretile_y; @@ -416,7 +416,7 @@ nsbeos_bitmap_get_pretile_xy(struct bitmap* bitmap) int height = bitmap->primary->Bounds().Height() + 1; int xmult = (MIN_PRETILE_WIDTH + width - 1)/width; int ymult = (MIN_PRETILE_HEIGHT + height - 1)/height; - LOG(("Pretiling %p for X*%d Y*%d", bitmap, xmult, ymult)); + LOG("Pretiling %p for X*%d Y*%d", bitmap, xmult, ymult); bitmap->pretile_xy = nsbeos_bitmap_generate_pretile(bitmap->primary, xmult, ymult); } return bitmap->pretile_xy; -- cgit v1.2.3