If to switch optimising
Hello there! I'll make it short. We've got the following code:
Code:
public abilities(id) |
Re: If to switch optimising
Code:
public abilities(id) |
Re: If to switch optimising
That was fast, thanks a lot exolent :).
|
Re: If to switch optimising
I doubt switch() will work this way.
|
Re: If to switch optimising
Quote:
It will definitely work. |
Re: If to switch optimising
It will not work because iFlag* are not constants. Remove 'static' and it will work.
|
Re: If to switch optimising
Quote:
|
Re: If to switch optimising
Thanks a lot both :).
|
Re: If to switch optimising
Do you really want to use a switch() ?
Because you can do the same with less code: Code:
public abilities( id ) |
Re: If to switch optimising
I prefer "if"s either, but they put the processor to do a harder job than switch() would, that's why I asked for a way to use switch in this case, I had no ideea it would be that difficult. The code you gave me doesn't work, compilation errors, but it doesn't matter, I've decided to use "if"s afterall :). Thanks for the help.
|
| All times are GMT -4. The time now is 18:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.