ZeroAuctions

16 - shorten addon:FormatTextMoney to FTM and addon:Log to Log to make the code a bit easier to read.

What does the provided patch do?

Makes the code a little easier to read.

Please provide any additional information below.

This was originally suggested by Neil.Reynolds in a private message discussing the possibility of someone else picking up QA3.

Quote from Neil.Reynolds:

Like the others, I support your idea, but haven't the time right now. I've made many changes/improvements to the stock QA3 code, and would be thrilled to send you some ideas/code fragments/suggestions for improvements. In particular, I'd beg you to add to the top of your modules/manage.lua

local function FTM(t) return QuickAuctions:FormatTextMoney(t, true) end
local function QLog(n, s, ...) QuickAuctions:Log(n, string.format(s,...)) end

and shorten his unnecessarily complicated and hard to read print statements.

QuickAuctions:Log(name.."query", string.format("Skipped %s lowest buyout is %s, threshold is %s suggested buyout is %s",
	   itemLink, QuickAuctions:FormatTextMoney(origBuyout, true), QuickAuctions:FormatTextMoney(threshold, true), QuickAuctions:FormatTextMoney(buyout, true)))


becomes

QLog(name.."query", "Skipped %s lowest buyout is %s, threshold is %s suggested buyout is %s",
	   itemLink, FTM(origBuyout), FTM(threshold), FTM(buyout))
Name Description Size MD5
FTM_and_log.hg Compressed patch (mercurial ... 3.7 KiB b66fd2c503c2...
FTM_and_log.diff diff extracted from ... 26.4 KiB 8ab295f0ba58...
User When Change
AsaAyers Oct 17, 2010 at 16:58 UTC

Added attachment FTM_and_log.diff

AsaAyers Oct 17, 2010 at 16:56 UTC

Added attachment FTM_and_log.hg

AsaAyers Oct 17, 2010 at 16:55 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • 1 comment

Facts

Last updated
Oct 17, 2010
Reported
Oct 17, 2010
Status
New - Issue has not had initial review yet.
Type
Patch - Source code patch for review
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees