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

Francois Gouget fgouget at codeweavers.com
Thu May 19 12:14:39 CDT 2022


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>
---
 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 bec5b1c5c..4e7a032a3 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()
-- 
2.30.2




More information about the wine-devel mailing list