-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
Description
void Compute_Total_Height(GameWindow *list_box)
{
int total_height = 0;
_ListboxData *data = static_cast<_ListboxData *>(list_box->Win_Get_User_Data());
WinInstanceData *instance_data = list_box->Win_Get_Instance_Data();
for (int i = 0; i < data->m_endPos; i++) {
if (data->m_listData[i].m_cell == nullptr) {
continue;
}
int height = 0;
for (int j = 0; j < data->m_columns; j++) {
int new_height = 0;
if (data->m_listData[i].m_cell[j].m_cellType != LISTBOX_TEXT) {
if (data->m_listData[i].m_cell[j].m_cellType != LISTBOX_IMAGE) {
if (new_height > height) {
height = new_height;
}
continue;
}
...It looks as if the
if (new_height > height) {
height = new_height;
}part is useless. Both new_height and height will always be 0, so this condition can never be true.