void sdl_font_info::_unload() { // Look for font in list of loaded fonts font_list_t::const_iterator i = font_list.begin(), end = font_list.end(); while (i != end) { if (i->second == this) { // Found, decrement reference counter and delete ref_count--; if (ref_count <= 0) { delete this; // ! font_list.erase(i->first); return; } } i++; } }
void sdl_font_info::_unload() { // Look for font in list of loaded fonts font_list_t::const_iterator i = font_list.begin(), end = font_list.end(); while (i != end) { if (i->second == this) { // Found, decrement reference counter and delete ref_count--; if (ref_count <= 0) { delete this; // ! font_list.erase(i->first); return; } } i++; } // if (!found) { #ifdef HAVE_SDL_TTF // use our own built-in font // fix_missing_overhead_map_fonts(); // fix_missing_interface_fonts(); #else logFatal("Can't open font resource file"); /* vector<DirectorySpecifier>::const_iterator i = data_search_path.begin(), end = data_search_path.end(); while (i != end) { FileSpecifier fonts = *i + "Fonts"; fdprintf(fonts.GetPath()); i++; } */ exit(1); #endif // } }