Francois Gouget : testbot: Cleanup uses of GetKeys(), GetItem(), GetKey() and CreateCollection().

Alexandre Julliard julliard at winehq.org
Wed Oct 31 13:40:50 CDT 2012


Module: tools
Branch: master
Commit: 403fbbff4d62226b0c27eae84c348d51b2560594
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=403fbbff4d62226b0c27eae84c348d51b2560594

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Oct 31 04:47:17 2012 +0100

testbot: Cleanup uses of GetKeys(), GetItem(), GetKey() and CreateCollection().

Specifically:
- Use GetItems() instead of GetKeys() where appropriate. This way the code is simpler and we avoid one call to GetItem() for each iteration.
- Don't call GetKey() when we already have the object's key in a variable.
- Don't store the result of CreateCollection() in a variable if we are only going to use it once.

---

 testbot/bin/CheckForWinetestUpdate.pl       |   11 +++-----
 testbot/bin/Engine.pl                       |   17 ++++--------
 testbot/bin/Janitor.pl                      |   38 ++++++++------------------
 testbot/bin/RevertVM.pl                     |    3 +-
 testbot/bin/WineRunBuild.pl                 |   10 ++-----
 testbot/bin/WineRunReconfig.pl              |    4 +--
 testbot/bin/WineRunTask.pl                  |    4 +--
 testbot/bin/WineSendLog.pl                  |    3 +-
 testbot/lib/WineTestBot/Branches.pm         |    8 +----
 testbot/lib/WineTestBot/CGI/Sessions.pm     |    6 +---
 testbot/lib/WineTestBot/Jobs.pm             |   35 +++++++-----------------
 testbot/lib/WineTestBot/Patches.pm          |   12 +++-----
 testbot/lib/WineTestBot/PendingPatchSets.pm |    3 +-
 testbot/lib/WineTestBot/StepsTasks.pm       |    8 +----
 testbot/lib/WineTestBot/Tasks.pm            |    4 +--
 testbot/lib/WineTestBot/Users.pm            |    6 +---
 testbot/lib/WineTestBot/VMs.pm              |    9 ++----
 testbot/web/JobDetails.pl                   |    5 +--
 testbot/web/Submit.pl                       |   24 ++++++----------
 19 files changed, 67 insertions(+), 143 deletions(-)

Diff:   http://source.winehq.org/git/tools.git/?a=commitdiff;h=403fbbff4d62226b0c27eae84c348d51b2560594



More information about the wine-cvs mailing list