mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Internal ImLoadFileToMemory() return void* instead of taking void** + allow optional int* file_size
This commit is contained in:
parent
4d83519244
commit
7b1168eb30
3 changed files with 14 additions and 15 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue