diff options
author | Joseph Powers <jpowers27@cox.net> | 2010-12-11 07:39:25 -0800 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2010-12-11 07:45:10 -0800 |
commit | 444c242c51e6b049598359ea6cf98e34f611838b (patch) | |
tree | c273485fbadc3e0dc7955f3fc8ace23f433c2934 /basctl/source/basicide/baside2b.cxx | |
parent | 52b66899d1fe579e3c89cb6f65ab505cc563a990 (diff) |
remove DECLARE_LIST( BreakPL, BreakPoint* )
Also simplify the prior patch & make sure the list is in the right order.
Diffstat (limited to 'basctl/source/basicide/baside2b.cxx')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 63fcf84d6290..4157d8284d84 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -975,13 +975,12 @@ void __EXPORT BreakPointWindow::Paint( const Rectangle& ) aBmpOff.X() = ( aOutSz.Width() - aBmpSz.Width() ) / 2; aBmpOff.Y() = ( nLineHeight - aBmpSz.Height() ) / 2; - BreakPoint* pBrk = GetBreakPoints().First(); - while ( pBrk ) + for ( size_t i = 0, n = GetBreakPoints().size(); i < n ; ++i ) { - ULONG nLine = pBrk->nLine-1; - ULONG nY = nLine*nLineHeight - nCurYOffset; + BreakPoint* pBrk = GetBreakPoints().at( i ); + size_t nLine = pBrk->nLine-1; + size_t nY = nLine*nLineHeight - nCurYOffset; DrawImage( Point( 0, nY ) + aBmpOff, pBrk->bEnabled ? aBrk1 : aBrk0 ); - pBrk = GetBreakPoints().Next(); } ShowMarker( TRUE ); } @@ -1039,20 +1038,16 @@ void BreakPointWindow::ShowMarker( BOOL bShow ) BreakPoint* BreakPointWindow::FindBreakPoint( const Point& rMousePos ) { - long nLineHeight = GetTextHeight(); - long nYPos = rMousePos.Y() + nCurYOffset; -// Image aBrk( ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->GetImage( IMGID_BRKENABLED ) ); -// Size aBmpSz( aBrk.GetSizePixel() ); -// aBmpSz = PixelToLogic( aBmpSz ); + size_t nLineHeight = GetTextHeight(); + size_t nYPos = rMousePos.Y() + nCurYOffset; - BreakPoint* pBrk = GetBreakPoints().First(); - while ( pBrk ) + for ( size_t i = 0, n = GetBreakPoints().size(); i < n ; ++i ) { - ULONG nLine = pBrk->nLine-1; - long nY = nLine*nLineHeight; + BreakPoint* pBrk = GetBreakPoints().at( i ); + size_t nLine = pBrk->nLine-1; + size_t nY = nLine*nLineHeight; if ( ( nYPos > nY ) && ( nYPos < ( nY + nLineHeight ) ) ) return pBrk; - pBrk = GetBreakPoints().Next(); } return 0; } |