Skip to content

Commit d74c5bd

Browse files
committed
Const functions
1 parent 0222285 commit d74c5bd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/NppJsonViewer/JsonViewDlg.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ void JsonViewDlg::SetSliderPosition(int pos) const
923923
SetWindowText(hZoomPercent, zoomText);
924924
}
925925

926-
void JsonViewDlg::SetTreeViewZoom(double dwZoomFactor)
926+
void JsonViewDlg::SetTreeViewZoom(double dwZoomFactor) const
927927
{
928928
HWND hTreeView = GetDlgItem(getHSelf(), IDC_TREE);
929929
static HFONT hCurrentFont = reinterpret_cast<HFONT>(SendMessage(hTreeView, WM_GETFONT, 0, 0));
@@ -943,7 +943,7 @@ void JsonViewDlg::SetTreeViewZoom(double dwZoomFactor)
943943
InvalidateRect(hTreeView, nullptr, TRUE);
944944
}
945945

946-
void JsonViewDlg::UpdateUIOnZoom(int zoomPercentage)
946+
void JsonViewDlg::UpdateUIOnZoom(int zoomPercentage) const
947947
{
948948
// Update slider
949949
SetSliderPosition(zoomPercentage);
@@ -953,7 +953,7 @@ void JsonViewDlg::UpdateUIOnZoom(int zoomPercentage)
953953
SetTreeViewZoom(zoomFactor);
954954
}
955955

956-
void JsonViewDlg::HandleZoomOnScroll(WPARAM wParam)
956+
void JsonViewDlg::HandleZoomOnScroll(WPARAM wParam) const
957957
{
958958
int pos = GetSliderPosition(); // Current slider position
959959
int delta = GET_WHEEL_DELTA_WPARAM(wParam);

src/NppJsonViewer/JsonViewDlg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ class JsonViewDlg
8989
void ShowControls(const std::vector<DWORD>& ids, bool show);
9090
void EnableControls(const std::vector<DWORD>& ids, bool enable);
9191

92-
auto GetZoomLevel() const -> int;
93-
void SetZoomLevel(int pos) const;
92+
auto GetSliderPosition() const -> int;
93+
void SetSliderPosition(int pos) const;
9494
void SetTreeViewZoom(double dwZoomFactor) const;
9595
void UpdateUIOnZoom(int zoomPercentage) const;
9696
void HandleZoomOnScroll(WPARAM wParam) const;

0 commit comments

Comments
 (0)