mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-20 18:52:28 +00:00
make the menu plist reading more efficient
This commit is contained in:
parent
d996c364b8
commit
66ab41534c
1 changed files with 2 additions and 4 deletions
|
@ -207,7 +207,7 @@ object_from_plist (PLItem plist)
|
||||||
|
|
||||||
PLItem read_plist (void)
|
PLItem read_plist (void)
|
||||||
{
|
{
|
||||||
local string plist_data, l;
|
local string plist_data;
|
||||||
local QFile file;
|
local QFile file;
|
||||||
local PLItem plist;
|
local PLItem plist;
|
||||||
|
|
||||||
|
@ -216,9 +216,7 @@ PLItem read_plist (void)
|
||||||
dprint ("could not load menu.plist\n");
|
dprint ("could not load menu.plist\n");
|
||||||
return NIL;
|
return NIL;
|
||||||
}
|
}
|
||||||
plist_data = str_new ();
|
plist_data = Qreadstring (file, Qfilesize (file));
|
||||||
while ((l = Qgetline (file)))
|
|
||||||
str_cat (plist_data, l);
|
|
||||||
Qclose (file);
|
Qclose (file);
|
||||||
plist = [PLItem newFromString:plist_data];
|
plist = [PLItem newFromString:plist_data];
|
||||||
str_free (plist_data);
|
str_free (plist_data);
|
||||||
|
|
Loading…
Reference in a new issue