mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-13 16:29:54 +02:00
Internal ImLoadFileToMemory() return void* instead of taking void** + allow optional int* file_size
This commit is contained in:
@ -1098,9 +1098,9 @@ ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)
|
||||
|
||||
ImFont* ImFontAtlas::AddFontFromFileTTF(const char* filename, float size_pixels, const ImFontConfig* font_cfg_template, const ImWchar* glyph_ranges)
|
||||
{
|
||||
void* data = NULL;
|
||||
int data_size = 0;
|
||||
if (!ImLoadFileToMemory(filename, "rb", (void**)&data, &data_size, 0))
|
||||
void* data = ImLoadFileToMemory(filename, "rb", &data_size, 0);
|
||||
if (!data)
|
||||
{
|
||||
IM_ASSERT(0); // Could not load file.
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user