comparison Comments.lua @ 269:463b0f117b1b

Minor cleanup.
author James D. Callahan III <jcallahan@curse.com>
date Wed, 20 Mar 2013 18:28:25 -0500
parents b6036060c096
children e1566483082c
comparison
equal deleted inserted replaced
268:b6036060c096 269:463b0f117b1b
341 end, 341 end,
342 } 342 }
343 343
344 function CreateCursorComment() 344 function CreateCursorComment()
345 local data_type, data, data_subtype, subdata = _G.GetCursorInfo() 345 local data_type, data, data_subtype, subdata = _G.GetCursorInfo()
346 346 local comment_func = CURSOR_DATA_FUNCS[data_type]
347 if not CURSOR_DATA_FUNCS[data_type] then 347
348 if not comment_func then
348 WDP:Print("Unable to determine comment subject from cursor.") 349 WDP:Print("Unable to determine comment subject from cursor.")
349 return 350 return
350 end 351 end
351 CURSOR_DATA_FUNCS[data_type](DATA_TYPE_MAPPING[data_type] or data_type:upper(), data, data_subtype, subdata) 352 comment_func(DATA_TYPE_MAPPING[data_type] or data_type:upper(), data, data_subtype, subdata)
352 end 353 end
353 end 354 end
354 355
355 local function CreateQuestComment() 356 local function CreateQuestComment()
356 local index = _G.GetQuestLogSelection() 357 local index = _G.GetQuestLogSelection()