Francois Gouget : testbot/orm: Let AddFilter() create the Collection Filter field.

Alexandre Julliard julliard at winehq.org
Thu May 19 16:11:13 CDT 2022


Module: tools
Branch: master
Commit: 51f70445d2ad8f6eea0df46fda02e45fe8d208d6
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=51f70445d2ad8f6eea0df46fda02e45fe8d208d6

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu May 19 19:14:39 2022 +0200

testbot/orm: Let AddFilter() create the Collection Filter field.

All that initializing Filter in the constructor does is waste memory.
Documenting its existence there is enough.
Furthermore Clone() shouldn't have been setting it to an empty hashref.
Fortunately a typo made this ineffectual.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/lib/ObjectModel/Collection.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm
index bec5b1c..4e7a032 100644
--- a/testbot/lib/ObjectModel/Collection.pm
+++ b/testbot/lib/ObjectModel/Collection.pm
@@ -91,7 +91,7 @@ sub new($$$$$;$$@)
               MasterColNames      => $MasterColNames,
               MasterColValues     => $MasterColValues,
               MasterKey           => ComputeMasterKey($MasterColValues),
-              Filter              => undef,
+              # Filter => undef by default
               AllScopeItems       => $AllScopeItems || {},
               Items               => undef};
   if ($AllScopeItems)
@@ -136,7 +136,7 @@ sub Clone($)
               MasterColNames      => $self->{MasterColNames},
               MasterColValues     => $self->{MasterColValues},
               MasterKey           => $self->{MasterKey},
-              Filters             => {},
+              # Filter => undef by default
               AllScopeItems       => $self->{AllScopeItems},
               Items               => undef};
   # See Collection::new()




More information about the wine-cvs mailing list