[tools] 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(a)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
participants (1)
-
Francois Gouget