Skip to content

Commit d61d5a6

Browse files
committed
Change page number data type to int. Closes #65
1 parent 029fb6d commit d61d5a6

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

include/pager.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ class Pager : public wxEvtHandler {
7878

7979
/// Set currently displayed page
8080
/// @param new_page number of currently displayed
81-
void SetCurrentPage(size_t new_page);
81+
void SetCurrentPage(int new_page);
8282

8383
/// Get currently displayed page number
8484
/// @return page number
85-
const size_t GetCurrentPage() { return m_current_page; }
85+
const int GetCurrentPage() { return m_current_page; }
8686

8787
/// Adds a page
8888
/// @param pg Page number
89-
void AddPage(const size_t pg) { m_pages.insert(pg); }
89+
void AddPage(const int pg) { m_pages.insert(pg); }
9090

9191
/// Get next page with rollover to the beginning of the list
9292
/// @return Page number
93-
const size_t GetNextPage();
93+
const int GetNextPage();
9494

9595
/// @brief Return true if the are covered by the pager was clicked
9696
/// @param x
@@ -113,8 +113,8 @@ class Pager : public wxEvtHandler {
113113

114114
private:
115115
DashboardSK* m_parent;
116-
size_t m_current_page;
117-
std::set<size_t> m_pages;
116+
int m_current_page;
117+
std::set<int> m_pages;
118118
wxCoord m_x_pos;
119119
wxCoord m_y_pos;
120120
};

src/pager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void Pager::Draw(dskDC* dc, PlugIn_ViewPort* vp, int canvasIndex)
5151
bmp.HasAlpha()); // TODO: make the position configurable
5252
}
5353

54-
const size_t Pager::GetNextPage()
54+
const int Pager::GetNextPage()
5555
{
5656
auto it = m_pages.find(m_current_page);
5757
it++;
@@ -132,7 +132,7 @@ bool Pager::ProcessMouseEvent(wxMouseEvent& event)
132132
mnu.Append(ID_PREFERENCES, _("Preferences..."));
133133
mnu.Append(ID_VISIBILITY, _("Toggle visibility"));
134134
for (auto& page : m_pages) {
135-
wxString s = wxString::Format(_("Page %llu"), page);
135+
wxString s = wxString::Format(_("Page %d"), page);
136136
mnu.Append(ID_PAGES + page, s);
137137
}
138138
mnu.Connect(wxEVT_COMMAND_MENU_SELECTED,
@@ -143,7 +143,7 @@ bool Pager::ProcessMouseEvent(wxMouseEvent& event)
143143
return false;
144144
}
145145

146-
void Pager::SetCurrentPage(size_t new_page)
146+
void Pager::SetCurrentPage(int new_page)
147147
{
148148
if (m_pages.find(new_page) != m_pages.end()) {
149149
m_current_page = new_page;

0 commit comments

Comments
 (0)