Raised This Month: $ Target: $400
 0% 

Is here any diff in these lines?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
9evill
Senior Member
Join Date: Apr 2007
Location: Lithuania
Old 08-04-2010 , 06:23   Is here any diff in these lines?
Reply With Quote #1

Hello. i want to know is here any difference if i check everything in one line or in two?
here is example
Code:
public FW_PlayerPreThink(id)
{
    if (!is_user_alive(id)) return PLUGIN_CONTINUE
    if (zp_get_user_zombie(id)) return PLUGIN_CONTINUE
...
Code:
public FW_PlayerPreThink(id)
{
    if (!is_user_alive(id) || !zp_get_user_zombie[id]) return PLUGIN_CONTINUE
...
if everything are in one line is they checked allways, or only if first checks fails?
which one of above examples is better by performance side? Or they both are same?

Last edited by 9evill; 08-04-2010 at 06:25.
9evill is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode