Ignore:
Timestamp:
Nov 16, 2001, 4:51:00 PM (24 years ago)
Author:
phaller
Message:

minor performance improvement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/dibsect.cpp

    r7327 r7361  
    1 /* $Id: dibsect.cpp,v 1.59 2001-11-13 13:18:22 sandervl Exp $ */
     1/* $Id: dibsect.cpp,v 1.60 2001-11-16 15:50:59 phaller Exp $ */
    22
    33/*
     
    786786DIBSection *DIBSection::findHDC(HDC hdc)
    787787{
    788  DIBSection *dsect = section;
    789 
    790   while(dsect)
     788  // PH 2001-08-18 shortcut for performance optimization
     789  if (!section)
     790      return NULL;
     791 
     792  DIBSection *dsect = section;
     793 
     794  do
    791795  {
    792796        if(dsect->hdc == hdc)
     
    796800        dsect = dsect->next;
    797801  }
     802  while(dsect);
     803   
    798804  return(NULL);
    799805}
Note: See TracChangeset for help on using the changeset viewer.