diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-04-04 16:00:05 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-04-04 16:03:19 +0200 |
commit | 7105951698c9a052f5bfad25a93c80728ae5e9e6 (patch) | |
tree | 5110f4ce68e9293aaf1d0215e51e3ed0977b08d1 | |
parent | a6981c2f2d626da3879b370d40236b6d21ce2041 (diff) | |
download | luaotfload-7105951698c9a052f5bfad25a93c80728ae5e9e6.tar.gz |
|table.insert()| is slower
The difference is negligible, but this make the code more consistent.
-rw-r--r-- | otfl-font-nms.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index 23207b8..c057c07 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -265,7 +265,7 @@ local function load_font(filename, fontnames, status, newfontnames, newstatus, t if db_timestamp == timestamp then for _,v in ipairs(status[filename].index) do mappings[#mappings+1] = oldmappings[v] - table.insert(newstatus[filename].index, #mappings) + newstatus[filename].index[#newstatus[filename].index+1] = #mappings end if trace_loading then logs.report("font already indexed: %s", filename) @@ -281,12 +281,12 @@ local function load_font(filename, fontnames, status, newfontnames, newstatus, t for i in ipairs(info) do local fullinfo = font_fullinfo(filename, i-1, texmf) mappings[#mappings+1] = fullinfo - table.insert(newstatus[filename].index, #mappings) + newstatus[filename].index[#newstatus[filename].index+1] = #mappings end else local fullinfo = font_fullinfo(filename, nil, texmf) mappings[#mappings+1] = fullinfo - table.insert(newstatus[filename].index, #mappings) + newstatus[filename].index[#newstatus[filename].index+1] = #mappings end else if trace_loading then |