diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index c5a846400b..fde89b3563 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -46,8 +46,13 @@ #include #endif +#include #include +// TODO: I have no idea why this is, but the libbe_test target needs this +#ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST +extern "C" float roundf(float x); +#endif //#define DEBUG_BVIEW #ifdef DEBUG_BVIEW @@ -65,14 +70,6 @@ #define MAX_ATTACHMENT_SIZE 49152 -static inline float -roundf(float v) -{ - if (v >= 0.0) - return floorf(v + 0.5); - else - return ceilf(v - 0.5); -} static property_info sViewPropInfo[] = { { "Frame", { B_GET_PROPERTY, 0 }, diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 95567fb2df..c6b3c6d9b6 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -42,6 +42,10 @@ #include #include +// TODO: I have no idea why this is, but the libbe_test target needs this +#ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST +extern "C" float roundf(float x); +#endif //#define DEBUG_WIN #ifdef DEBUG_WIN @@ -52,16 +56,6 @@ #endif -// TODO: move to some place public (used in View.cpp as well) -static inline float -roundf(float v) -{ - if (v >= 0.0) - return floorf(v + 0.5); - else - return ceilf(v - 0.5); -} - class BWindow::Shortcut { public: Shortcut(uint32 key, uint32 modifiers, BMenuItem* item); @@ -2957,7 +2951,6 @@ BWindow::PrintToStream() const TODO list: *) take care of temporarely events mask!!! - *) what's with this flag B_ASYNCHRONOUS_CONTROLS ? *) test arguments for SetWindowAligment *) call hook functions: MenusBeginning, MenusEnded. Add menu activation code. */