From cf6175b91f68dff14731bee7569602c6855ce2c7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 5 Sep 2023 16:12:04 +0300 Subject: useless parameter removed --- plugins/NewStory/src/history_control.cpp | 12 ++++++------ plugins/NewStory/src/history_control.h | 2 +- plugins/NewStory/src/history_menus.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 313d8bd3ea..ed4df6fd3f 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -190,15 +190,15 @@ static LRESULT CALLBACK HistoryEditWndProc(HWND hwnd, UINT msg, WPARAM wParam, L return mir_callNextSubclass(hwnd, HistoryEditWndProc, msg, wParam, lParam); } -void NewstoryListData::BeginEditItem(int index, bool bReadOnly) +void NewstoryListData::BeginEditItem(bool bReadOnly) { if (hwndEditBox) EndEditItem(false); - if (scrollTopItem > index) + if (scrollTopItem > caret) return; - ItemData *item = LoadItem(index); + ItemData *item = LoadItem(caret); if (item->dbe.eventType != EVENTTYPE_MESSAGE) return; @@ -209,7 +209,7 @@ void NewstoryListData::BeginEditItem(int index, bool bReadOnly) int idx = scrollTopItem; int itemHeight = GetItemHeight(idx); while (top < height) { - if (idx == index) + if (idx == caret) break; top += itemHeight; @@ -977,7 +977,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break; case VK_F2: - data->BeginEditItem(data->caret, false); + data->BeginEditItem(false); break; case VK_ESCAPE: @@ -1060,7 +1060,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM } if (data->caret == idx) { - data->BeginEditItem(idx, true); + data->BeginEditItem(true); return 0; } } diff --git a/plugins/NewStory/src/history_control.h b/plugins/NewStory/src/history_control.h index 00762259ee..7b8551b404 100644 --- a/plugins/NewStory/src/history_control.h +++ b/plugins/NewStory/src/history_control.h @@ -59,7 +59,7 @@ struct NewstoryListData : public MZeroedObject void AddSelection(int iFirst, int iLast); bool AtBottom(void) const; bool AtTop(void) const; - void BeginEditItem(int index, bool bReadOnly); + void BeginEditItem(bool bReadOnly); void Clear(); void ClearSelection(int iFirst, int iLast); void Copy(bool bTextOnly = false); diff --git a/plugins/NewStory/src/history_menus.cpp b/plugins/NewStory/src/history_menus.cpp index 394ede04a3..1d1a6e3e3d 100644 --- a/plugins/NewStory/src/history_menus.cpp +++ b/plugins/NewStory/src/history_menus.cpp @@ -65,7 +65,7 @@ static INT_PTR NSMenuHelper(WPARAM wParam, LPARAM lParam) break; case MENU_EDIT: - pData->BeginEditItem(pData->caret, false); + pData->BeginEditItem(false); break; case MENU_DELETE: -- cgit v1.2.3