Francois Gouget : testbot/lib: Simplify and optimize Collection::Validate( ).
Alexandre Julliard
julliard at winehq.org
Thu Jun 12 11:29:30 CDT 2014
Module: tools
Branch: master
Commit: f65fa587273a3130ec69f04a26f3ce1d17fe503d
URL: http://source.winehq.org/git/tools.git/?a=commit;h=f65fa587273a3130ec69f04a26f3ce1d17fe503d
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Thu Jun 12 10:15:45 2014 +0200
testbot/lib: Simplify and optimize Collection::Validate().
---
testbot/lib/ObjectModel/Collection.pm | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm
index 7dbcf63..0070c57 100644
--- a/testbot/lib/ObjectModel/Collection.pm
+++ b/testbot/lib/ObjectModel/Collection.pm
@@ -409,18 +409,14 @@ sub Validate
if ($Item->GetIsNew())
{
my $HasSequenceKey = !1;
- my $ErrProperty, my $ErrMessage;
foreach my $PropertyDescriptor (@{$self->{PropertyDescriptors}})
{
- if ($PropertyDescriptor->GetIsKey())
+ if ($PropertyDescriptor->GetIsKey() &&
+ $PropertyDescriptor->GetClass() eq "Basic" &&
+ $PropertyDescriptor->GetType() eq "S")
{
- $ErrProperty = $PropertyDescriptor->GetName();
- $ErrMessage = $Item->$ErrProperty;
- if ($PropertyDescriptor->GetClass() eq "Basic" &&
- $PropertyDescriptor->GetType() eq "S")
- {
- $HasSequenceKey = 1;
- }
+ $HasSequenceKey = 1;
+ last;
}
}
if (! $HasSequenceKey)
More information about the wine-cvs
mailing list