[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kopete-devel
Subject:    Re: [kopete-devel] Patch to be reviewed for a crash fixed in Kopete
From:       "=?ISO-8859-1?Q?Nicolas_L=E9cureuil?=" <neoclust.kde () gmail ! com>
Date:       2008-11-03 22:37:03
Message-ID: 547338e40811031437v4d645621p1ec9d2d2a72e4af0 () mail ! gmail ! com
[Download RAW message or body]

On Mon, Nov 3, 2008 at 4:39 PM, David Faure <faure@kde.org> wrote:
> On Sunday 02 November 2008, Nicolas Lécureuil wrote:
>> +    JabberCapabilitiesManager *cm = account->protocol()->capabilitiesManager();
>> +    if ( cm && cm->capabilitiesEnabled(jid) )
>> +    {
>> +        d->capsEnabled = account->protocol()->capabilitiesManager()->capabilitiesEnabled(jid);
>> +    }
>>
>
> You mean
> d->capsEnabled =  cm && cm->capabilitiesEnabled(jid);
> no?
>
> Your patch is calling the same twice just to set a bool...
>

i understand, do you agree with this ?


Index: protocols/jabber/jabberresource.cpp
===================================================================
--- protocols/jabber/jabberresource.cpp (révision 879209)
+++ protocols/jabber/jabberresource.cpp (copie de travail)
@@ -56,10 +56,7 @@
        : d( new Private(account, jid, resource) )
 {
     JabberCapabilitiesManager *cm = account->protocol()->capabilitiesManager();
-    if ( cm && cm->capabilitiesEnabled(jid) )
-    {
-        d->capsEnabled = cm->capabilitiesEnabled(jid);
-    }
+        d->capsEnabled = cm && cm->capabilitiesEnabled(jid);

        if ( account->isConnected () )
        {


i didn't wanted to do it because it was less readable for me, but i
need to take good habits from the begining of my c++ aventure :p
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic