diff --git a/demo/src/server/nitlog/main.cc b/demo/src/server/nitlog/main.cc index b9fd9117ee..f8f4d4b5cf 100644 --- a/demo/src/server/nitlog/main.cc +++ b/demo/src/server/nitlog/main.cc @@ -90,9 +90,9 @@ class Log_entry */ void draw(Canvas *canvas, int y, int new_section = false) { - Color label_fgcol = Color(min(255, _color.r + 200), - min(255, _color.g + 200), - min(255, _color.b + 200)); + Color label_fgcol = Color(Genode::min(255, _color.r + 200), + Genode::min(255, _color.g + 200), + Genode::min(255, _color.b + 200)); Color label_bgcol = Color(_color.r, _color.g, _color.b); Color text_fgcol = Color(180, 180, 180); Color text_bgcol = Color(_color.r / 2, _color.g / 2, _color.b / 2); diff --git a/os/include/nitpicker_gfx/canvas.h b/os/include/nitpicker_gfx/canvas.h index 8797e1252d..af0b0c29ae 100644 --- a/os/include/nitpicker_gfx/canvas.h +++ b/os/include/nitpicker_gfx/canvas.h @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/os/include/nitpicker_gfx/chunky_canvas.h b/os/include/nitpicker_gfx/chunky_canvas.h index 1989b05615..c85271bab9 100644 --- a/os/include/nitpicker_gfx/chunky_canvas.h +++ b/os/include/nitpicker_gfx/chunky_canvas.h @@ -109,8 +109,8 @@ class Chunky_canvas : public Canvas for ( ; *str && (x <= _clip.x2()); str++) { int w = font.wtab[*str]; - int start = max(0, _clip.x1() - x); - int end = min(w - 1, _clip.x2() - x); + int start = Genode::max(0, _clip.x1() - x); + int end = Genode::min(w - 1, _clip.x2() - x); PT *d = dst + x; unsigned char const *s = src + font.otab[*str]; diff --git a/os/include/nitpicker_gfx/miscmath.h b/os/include/nitpicker_gfx/miscmath.h deleted file mode 100644 index f490c6bd70..0000000000 --- a/os/include/nitpicker_gfx/miscmath.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * \brief Commonly used math functions - * \author Norman Feske - * \date 2006-04-12 - */ - -/* - * Copyright (C) 2006-2013 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU General Public License version 2. - */ - -#ifndef _INCLUDE__NITPICKER_GFX__MISCMATH_H_ -#define _INCLUDE__NITPICKER_GFX__MISCMATH_H_ - -template -T max(T v1, T v2) { return v1 > v2 ? v1 : v2; } - -template -T min(T v1, T v2) { return v1 < v2 ? v1 : v2; } - -#endif /* _INCLUDE__NITPICKER_GFX__MISCMATH_H_ */ diff --git a/os/src/server/nitpicker/user_state.cc b/os/src/server/nitpicker/user_state.cc index 100fb85943..80e5904689 100644 --- a/os/src/server/nitpicker/user_state.cc +++ b/os/src/server/nitpicker/user_state.cc @@ -57,8 +57,8 @@ void User_state::handle_event(Input::Event ev) /* transparently handle absolute and relative motion events */ if (type == Event::MOTION) { if ((ev.rx() || ev.ry()) && ev.ax() == 0 && ev.ay() == 0) { - ax = max(0, min((int)size().w(), ax + ev.rx())); - ay = max(0, min((int)size().h(), ay + ev.ry())); + ax = Genode::max(0, Genode::min((int)size().w(), ax + ev.rx())); + ay = Genode::max(0, Genode::min((int)size().h(), ay + ev.ry())); } else { ax = ev.ax(); ay = ev.ay(); diff --git a/ports/src/vancouver/console.cc b/ports/src/vancouver/console.cc index b5f4d42f6e..e70c3e4e49 100644 --- a/ports/src/vancouver/console.cc +++ b/ports/src/vancouver/console.cc @@ -92,8 +92,8 @@ unsigned Vancouver_console::_input_to_ps2mouse(Input::Event const *ev) /* clamp relative motion vector to bounds */ int const boundary = 200; - int const rx = min(boundary, max(-boundary, ev->rx())); - int const ry = -min(boundary, max(-boundary, ev->ry())); + int const rx = Genode::min(boundary, Genode::max(-boundary, ev->rx())); + int const ry = -Genode::min(boundary, Genode::max(-boundary, ev->ry())); /* assemble PS/2 packet */ Ps2_mouse_packet::access_t packet = 0;