From 7c7429c015b8ec89a41c36e0fb4342fcea1c1c2f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 11 Dec 2023 02:09:26 +0100 Subject: [PATCH] Stop using "short" for wxGenericTreeCtrl::m_indent There doesn't seem no reason at all not to use "int" for this member. --- include/wx/generic/treectlg.h | 2 +- src/generic/treectlg.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h index 7e98c1c1da..22469cf547 100644 --- a/include/wx/generic/treectlg.h +++ b/include/wx/generic/treectlg.h @@ -243,7 +243,7 @@ protected: *m_key_current, // A hint to select a parent item after deleting a child *m_select_me; - unsigned short m_indent; + unsigned int m_indent; int m_lineHeight; wxPen m_dottedPen; wxBrush m_hilightBrush, diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index d7e9de71ae..a55f9a06e6 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -1088,7 +1088,7 @@ unsigned int wxGenericTreeCtrl::GetCount() const void wxGenericTreeCtrl::SetIndent(unsigned int indent) { - m_indent = (unsigned short) indent; + m_indent = indent; m_dirty = true; } @@ -2836,7 +2836,7 @@ wxGenericTreeCtrl::PaintLevel(wxGenericTreeItem *item, { // draw the horizontal line here int x_start = x; - if (x > (signed)m_indent) + if (x > (int)m_indent) x_start -= m_indent; else if (HasFlag(wxTR_LINES_AT_ROOT)) x_start = 3;