]> git.pond.sub.org Git - empserver/commit
power: Simplify tallying the power value of items
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 27 May 2016 13:42:17 +0000 (15:42 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 12:05:30 +0000 (14:05 +0200)
commitc0ce2b9973736c3e6802494da76fb67fff9789fd
tree2889c493a902f97d5075d64249e473b8240a30e2
parentda05484d8bff331b3377b87636163c8ce4f3ba68
power: Simplify tallying the power value of items

Item power value is basically number of items times the item power
weight.  For some item types, we add up the item numbers, then apply
the weight.  For lcms and hcms, we apply the weight, then add up the
weighted numbers.

Adopt the latter method for all types: change addtopow() to tally the
power value for all types instead of just lcms and hcms, and drop
gen_power()'s item power value computation.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/powe.c