From 9914eb8d94d74477e540f2573c80dae3c5ace0a6 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Sun, 1 Jan 2023 04:25:46 -0500 Subject: [PATCH] gui_file_dialog: Fix warning (#248) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change fixes a type warning in gui_file_dialog.h... ``` examples/custom_file_dialog/gui_file_dialog.h: In function ‘GuiFileDialog’: examples/custom_file_dialog/gui_file_dialog.h:313:198: warning: passing argument 2 of ‘GuiListViewEx’ from incompatible pointer type [-Wincompatible-pointer-types] 313 | dowBounds.y + 48 + 20, state->windowBounds.width - 16, state->windowBounds.height - 60 - 16 - 68 }, dirFilesIcon, state->dirFiles.count, &state->itemFocused, &state->filesListScrollIndex, state->filesListActive); | ^~~~~~~~~~~~ | | | char ** In file included from examples/custom_file_dialog/gui_file_dialog.h:120 examples/custom_file_dialog/../../src/raygui.h:2762:50: note: expected ‘const char **’ but argument is of type ‘char **’ 2762 | int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, int *scrollIndex, int active) ``` --- examples/custom_file_dialog/gui_file_dialog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/custom_file_dialog/gui_file_dialog.h b/examples/custom_file_dialog/gui_file_dialog.h index f8a538b..e89040a 100644 --- a/examples/custom_file_dialog/gui_file_dialog.h +++ b/examples/custom_file_dialog/gui_file_dialog.h @@ -310,7 +310,7 @@ void GuiFileDialog(GuiFileDialogState *state) # if defined(USE_CUSTOM_LISTVIEW_FILEINFO) state->filesListActive = GuiListViewFiles((Rectangle){ state->position.x + 8, state->position.y + 48 + 20, state->windowBounds.width - 16, state->windowBounds.height - 60 - 16 - 68 }, fileInfo, state->dirFiles.count, &state->itemFocused, &state->filesListScrollIndex, state->filesListActive); # else - state->filesListActive = GuiListViewEx((Rectangle){ state->windowBounds.x + 8, state->windowBounds.y + 48 + 20, state->windowBounds.width - 16, state->windowBounds.height - 60 - 16 - 68 }, dirFilesIcon, state->dirFiles.count, &state->itemFocused, &state->filesListScrollIndex, state->filesListActive); + state->filesListActive = GuiListViewEx((Rectangle){ state->windowBounds.x + 8, state->windowBounds.y + 48 + 20, state->windowBounds.width - 16, state->windowBounds.height - 60 - 16 - 68 }, (const char**)dirFilesIcon, state->dirFiles.count, &state->itemFocused, &state->filesListScrollIndex, state->filesListActive); # endif GuiSetStyle(LISTVIEW, TEXT_ALIGNMENT, prevTextAlignment); GuiSetStyle(LISTVIEW, LIST_ITEMS_HEIGHT, prevElementsHeight);