|
From: andrew7 <bd...@us...> - 2006-11-03 13:30:33
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27951/include/smartwin/widgets Modified Files: WidgetMenuExtended.h Log Message: std::min to (std::min) to prevent macro min problem Index: WidgetMenuExtended.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetMenuExtended.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- WidgetMenuExtended.h 13 Oct 2006 00:45:56 -0000 1.42 +++ WidgetMenuExtended.h 3 Nov 2006 13:30:21 -0000 1.43 @@ -272,21 +272,21 @@ : Bitmap::getBitmapSize( info.hbmpChecked ); // take the maximum of all available images or set default image size - imageSize.x = std::max( imageSize.x, checkImageSize.x ); - imageSize.y = std::max( imageSize.y, checkImageSize.y ); + imageSize.x = (std::max)( imageSize.x, checkImageSize.x ); + imageSize.y = (std::max)( imageSize.y, checkImageSize.y ); bool hasImage = ( imageSize.x != 0 ) && ( imageSize.y != 0 ); // set default image size if no image is available if ( !hasImage ) { - imageSize.x = std::max( defaultImageSize.x, std::max( imageSize.x, checkImageSize.x ) ); - imageSize.y = std::max( defaultImageSize.y, std::max( imageSize.y, checkImageSize.y ) ); + imageSize.x = (std::max)( defaultImageSize.x, (std::max)( imageSize.x, checkImageSize.x ) ); + imageSize.y = (std::max)( defaultImageSize.y, (std::max)( imageSize.y, checkImageSize.y ) ); } // adjust default image size - defaultImageSize.x = std::max( defaultImageSize.x, imageSize.x ); - defaultImageSize.y = std::max( defaultImageSize.y, imageSize.y ); + defaultImageSize.x = (std::max)( defaultImageSize.x, imageSize.x ); + defaultImageSize.y = (std::max)( defaultImageSize.y, imageSize.y ); // adjust width if ( !isMenuBar || // if not menu bar item @@ -296,12 +296,12 @@ itemWidth += imageSize.x + textIconGap + pointerGap; // adjust item height - itemHeight = std::max( itemHeight, ( UINT ) imageSize.y + borderGap ); + itemHeight = (std::max)( itemHeight, ( UINT ) imageSize.y + borderGap ); } // adjust width for system menu items if ( menu->isSysMenu ) - itemWidth = std::max( ( UINT ) minSysMenuItemWidth, itemWidth ); + itemWidth = (std::max)( ( UINT ) minSysMenuItemWidth, itemWidth ); // adjust width for sidebar if ( menu->drawSidebar ) @@ -316,7 +316,7 @@ } // adjust item height - itemHeight = std::max( itemHeight, ( UINT )::GetSystemMetrics( SM_CYMENU ) ); + itemHeight = (std::max)( itemHeight, ( UINT )::GetSystemMetrics( SM_CYMENU ) ); return true; } |