Module: wine Branch: master Commit: 2c8ea6ebff21428dc407d85af3f516083d544bd8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2c8ea6ebff21428dc407d85af3...
Author: Ričardas Barkauskas rbarkauskas@codeweavers.com Date: Fri Dec 21 19:07:17 2012 +0200
comctl32: Avoid code duplication by reusing PROPSHEET_GetPageIndex.
---
dlls/comctl32/propsheet.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index c3db7e3..f2c55ab 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -2561,16 +2561,11 @@ static LRESULT PROPSHEET_IndexToHwnd(HWND hwndDlg, int iPageIndex) */ static LRESULT PROPSHEET_PageToIndex(HWND hwndDlg, HPROPSHEETPAGE hPage) { - int index; PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
TRACE("(%p, %p)\n", hwndDlg, hPage);
- for (index = 0; index < psInfo->nPages; index++) - if (psInfo->proppage[index].hpage == hPage) - return index; - WARN("%p not found\n", hPage); - return -1; + return PROPSHEET_GetPageIndex(hPage, psInfo, -1); }
/******************************************************************************