Module: tools
Branch: master
Commit: 9ee451bf6f647490636c526710e16621907f6c16
URL: https://source.winehq.org/git/tools.git/?a=commit;h=9ee451bf6f647490636c526…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu May 19 19:14:52 2022 +0200
testbot/orm: Let the Collection Items field pop into existence when needed.
Collections don't check that it exists so all setting it in the
constructor does is waste memory. Documenting its existence there is
enough.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/ObjectModel/Collection.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm
index 4e7a032..63d470b 100644
--- a/testbot/lib/ObjectModel/Collection.pm
+++ b/testbot/lib/ObjectModel/Collection.pm
@@ -93,7 +93,8 @@ sub new($$$$$;$$@)
MasterKey => ComputeMasterKey($MasterColValues),
# Filter => undef by default
AllScopeItems => $AllScopeItems || {},
- Items => undef};
+ # Items => undef by default
+ };
if ($AllScopeItems)
{
# Avoid memory cycles in case Items have Detailref properties:
@@ -138,7 +139,8 @@ sub Clone($)
MasterKey => $self->{MasterKey},
# Filter => undef by default
AllScopeItems => $self->{AllScopeItems},
- Items => undef};
+ # Items => undef by default
+ };
# See Collection::new()
weaken($Copy->{AllScopeItems});