tag:blogger.com,1999:blog-4657142000183363795.post7063695005406666972..comments2018-12-26T19:39:47.895-08:00Comments on Base Metal Games: Base Metal Blog Weekend Edition, August 24-25, 2013Anonymoushttp://www.blogger.com/profile/04441790807840642185noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-4657142000183363795.post-36013619738372447922013-08-26T12:22:01.578-07:002013-08-26T12:22:01.578-07:00Well, that's strictly example code of course. ...Well, that's strictly example code of course. :)<br /><br />I've typically been doing this in cases where one component is expecting another component to be present on the same game object. There's a pointer that needs to be bound to the other component well after construction, so it can't be a reference.<br /><br />This basically lets me know "the data is bad" without crashing the game, so I can fix it and reload it without restarting the game.<br />Anonymoushttps://www.blogger.com/profile/04441790807840642185noreply@blogger.comtag:blogger.com,1999:blog-4657142000183363795.post-62423556060158596812013-08-26T12:10:08.255-07:002013-08-26T12:10:08.255-07:00Hey Craig!
What about void Fn(TYPE &val)?
I...Hey Craig!<br /><br />What about void Fn(TYPE &val)? <br /><br />In other words, make the caller do the check. To me, pointer means optional and if we're putting in an assert it's clearly not optional, which makes for a confusing interface.Anonymoushttps://www.blogger.com/profile/00255562766065936556noreply@blogger.com