- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
this code comes from the unreal tournament source code.
Admin
[image]
Admin
This can be perfectly valid.
Would be perfectly valid if:
$script = 0 unless (defined($script));
or
$script||=0; #(to some extent)
Admin
Wait, Self-Documenting or self-deprecating?
Admin
you can actually executed that return by:
that will actually compile and run....
Admin
Supra shoes are so popular all over the world. Whatever you take on Supra being in the Supra Skytop Shoes market. Now Supra Strapped Shoes also very popular attention. It is nice that they actually took the time to make Supra Skate Shoes that work well. Supra shoes is a brand that has been inspired, designed and marketed by passionate individuals. We have brought to you the fullest selection of Supra footwear at cheapest price. Overload Skateshop carries a wide range of Supra Shoes to fit your 9-stair kickflips.
Admin
Regarding the "if(!this)"... yes, it can happen in C++. If the function is not virtual, it will just be called, even if the object is a null pointer.
Probably would be better to figure it out another way, but... If the developer has inherited a messy/buggy system, where sometimes close() gets called on a null pointer, that is a perfectly reasonable solution.
Admin
AAAAGH!
You dont need any of that fancy stuff...
T *p = NULL; p->func();
This WILL properly call the member function [it will only be "broken" if func is virtual), so checking (this!=null) is actually valid