Changeset 7361 for trunk/src


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

minor performance improvement

Location:
trunk/src/gdi32
Files:
2 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}
  • trunk/src/gdi32/line.cpp

    r6684 r7361  
    1 /* $Id: line.cpp,v 1.10 2001-09-09 12:24:13 sandervl Exp $ */
     1/* $Id: line.cpp,v 1.11 2001-11-16 15:51:00 phaller Exp $ */
    22/*
    33 * Line API's
     
    2121#define ROUND_FLOAT(x) ((INT)((x < 0) ? x-0.5:x+0.5))
    2222
    23 VOID toWin32LineEnd(PPOINTLOS2 startPt,INT nXEnd,INT nYEnd,PPOINTLOS2 pt)
     23static VOID INLINE toWin32LineEnd(PPOINTLOS2 startPt,INT nXEnd,INT nYEnd,PPOINTLOS2 pt)
    2424{
    2525  if ((startPt->x != nXEnd) || (startPt->y != nYEnd))
     
    4949}
    5050
    51 BOOL drawSingleLinePoint(HDC hdc,pDCData pHps,PPOINTLOS2 pt)
     51static BOOL INLINE drawSingleLinePoint(HDC hdc,pDCData pHps,PPOINTLOS2 pt)
    5252{
    5353  LOGPEN penInfo;
Note: See TracChangeset for help on using the changeset viewer.