Ignore:
Timestamp:
Oct 17, 2001, 3:26:57 PM (24 years ago)
Author:
phaller
Message:

Minor optimization for micro functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r6972 r7090  
    1 /* $Id: win32wbase.cpp,v 1.289 2001-10-09 05:18:03 phaller Exp $ */
     1/* $Id: win32wbase.cpp,v 1.290 2001-10-17 13:26:57 phaller Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    29042904BOOL Win32BaseWindow::IsChild(HWND hwndParent)
    29052905{
    2906     if(getParent()) {
    2907          if(getParent()->getWindowHandle() == hwndParent)
    2908              return TRUE;
    2909 
    2910          return getParent()->IsChild(hwndParent);
    2911     }
    2912     else return 0;
     2906  // PH: Optimizer won't unroll calls to getParent() even
     2907  // in release build.
     2908  Win32BaseWindow *_parent = getParent();
     2909   
     2910  if(_parent)
     2911  {
     2912    if(_parent->getWindowHandle() == hwndParent)
     2913      return TRUE;
     2914
     2915    return _parent->IsChild(hwndParent);
     2916  }
     2917  else
     2918    return 0;
    29132919}
    29142920//******************************************************************************
     
    31963202    {
    31973203    case GW_HWNDFIRST:
    3198         if(getParent())
    3199         {
    3200             window = (Win32BaseWindow *)getParent();
     3204        window = (Win32BaseWindow *)getParent();
     3205        if(window)
     3206        {
    32013207            hwndRelated = OSLibWinQueryWindow(window->getOS2WindowHandle(), QWOS_TOP);
    32023208            window = GetWindowFromOS2FrameHandle(hwndRelated);
     
    32143220
    32153221    case GW_HWNDLAST:
    3216         if(getParent()) {
    3217             window = (Win32BaseWindow *)getParent();
     3222        window = (Win32BaseWindow *)getParent();
     3223        if(window) {
    32183224            hwndRelated = OSLibWinQueryWindow(window->getOS2WindowHandle(), QWOS_BOTTOM);
    32193225            dprintf(("os2 handle %x", hwndRelated));
     
    32643270
    32653271    case GW_OWNER:
    3266         if(getOwner()) {
    3267             hwndRelated = getOwner()->getWindowHandle();
     3272      {
     3273        Win32BaseWindow *owner = getOwner();
     3274        if(owner) {
     3275            hwndRelated = owner->getWindowHandle();
    32683276        }
    32693277        break;
     3278      }
    32703279
    32713280    case GW_CHILD:
Note: See TracChangeset for help on using the changeset viewer.