# HG changeset patch # User James D. Callahan III # Date 1363822105 18000 # Node ID 463b0f117b1b4e3ea67fbde5680ff1197460ef51 # Parent b6036060c096de2b50f0cdfef0f974efc9211697 Minor cleanup. diff -r b6036060c096 -r 463b0f117b1b Comments.lua --- a/Comments.lua Wed Mar 20 13:02:29 2013 -0500 +++ b/Comments.lua Wed Mar 20 18:28:25 2013 -0500 @@ -343,12 +343,13 @@ function CreateCursorComment() local data_type, data, data_subtype, subdata = _G.GetCursorInfo() + local comment_func = CURSOR_DATA_FUNCS[data_type] - if not CURSOR_DATA_FUNCS[data_type] then + if not comment_func then WDP:Print("Unable to determine comment subject from cursor.") return end - CURSOR_DATA_FUNCS[data_type](DATA_TYPE_MAPPING[data_type] or data_type:upper(), data, data_subtype, subdata) + comment_func(DATA_TYPE_MAPPING[data_type] or data_type:upper(), data, data_subtype, subdata) end end