Internal ImLoadFileToMemory() return void* instead of taking void** + allow optional int* file_size

This commit is contained in:
ocornut
2015-09-11 16:01:54 +01:00
parent 4d83519244
commit 7b1168eb30
3 changed files with 14 additions and 15 deletions

View File

@ -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;