summaryrefslogtreecommitdiff
path: root/beos/window.cpp
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
committerVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
commitc105738fa36bb2400adc47399c5b878d252d1c86 (patch)
tree138eeb449e1bf51ee1726b5f820740aada0ccd0b /beos/window.cpp
parent20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff)
downloadnetsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.gz
netsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.bz2
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.
Diffstat (limited to 'beos/window.cpp')
-rw-r--r--beos/window.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/beos/window.cpp b/beos/window.cpp
index b85d07d81..9d7d6f230 100644
--- a/beos/window.cpp
+++ b/beos/window.cpp
@@ -433,19 +433,19 @@ void nsbeos_dispatch_event(BMessage *message)
continue;
if (gui && gui != z) {
- LOG(("discarding event for destroyed gui_window"));
+ LOG("discarding event for destroyed gui_window");
delete message;
return;
}
if (scaffold && (!y || scaffold != y->scaffold)) {
- LOG(("discarding event for destroyed scaffolding"));
+ LOG("discarding event for destroyed scaffolding");
delete message;
return;
}
// messages for top-level
if (scaffold) {
- LOG(("dispatching to top-level"));
+ LOG("dispatching to top-level");
nsbeos_scaffolding_dispatch_event(scaffold, message);
delete message;
return;
@@ -761,7 +761,7 @@ void nsbeos_window_keypress_event(BView *view, gui_window *g, BMessage *event)
if (!numbytes)
numbytes = strlen(bytes);
- LOG(("mods 0x%08lx key %ld raw %ld byte[0] %d", mods, key, raw_char, buff[0]));
+ LOG("mods 0x%08lx key %ld raw %ld byte[0] %d", mods, key, raw_char, buff[0]);
char byte;
if (numbytes == 1) {
@@ -1091,7 +1091,7 @@ static void gui_window_update_extent(struct gui_window *g)
float y_prop = g->view->Bounds().Height() / y_max;
x_max -= g->view->Bounds().Width() + 1;
y_max -= g->view->Bounds().Height() + 1;
- LOG(("x_max = %f y_max = %f x_prop = %f y_prop = %f\n", x_max, y_max, x_prop, y_prop));
+ LOG("x_max = %f y_max = %f x_prop = %f y_prop = %f\n", x_max, y_max, x_prop, y_prop);
if (g->view->ScrollBar(B_HORIZONTAL)) {
g->view->ScrollBar(B_HORIZONTAL)->SetRange(0, x_max);
g->view->ScrollBar(B_HORIZONTAL)->SetProportion(x_prop);