Re: about the (void) transfer

13 views
Skip to first unread message

Morgan McGuire

unread,
May 3, 2013, 7:39:40 AM5/3/13
to Gmail, g3d-...@googlegroups.com
It suppresses the warnings about unused variables in the release build.

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan


On Fri, May 3, 2013 at 1:39 AM, Gmail <milt...@gmail.com> wrote:
I saw (void)varname in the source code but I don't know what it used for.

From my iPad

Corey Taylor

unread,
May 3, 2013, 7:48:16 PM5/3/13
to g3d-...@googlegroups.com, Gmail
Some libraries have an "UNUSED" macro to make it more obvious.  That may help to clean things up.

corey


--
You received this message because you are subscribed to the Google Groups "G3D Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to g3d-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gmail

unread,
May 4, 2013, 6:57:35 PM5/4/13
to Corey Taylor, g3d-...@googlegroups.com
I even saw that in the sample "starter" in loadScene method. Is it some special use for shared_ptr?

----------
Xana Hopper
NAEI
Yantai, Shandong, China

Corey Taylor

unread,
May 4, 2013, 8:09:18 PM5/4/13
to Gmail, g3d-...@googlegroups.com
It's no different for any type.
 
corey

Morgan McGuire

unread,
May 4, 2013, 8:11:21 PM5/4/13
to g3d-...@googlegroups.com
This is a very standard C practice that works for any type.

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan


On Sat, May 4, 2013 at 6:57 PM, Gmail <milt...@gmail.com> wrote:

Xana Hopper

unread,
May 5, 2013, 11:31:48 AM5/5/13
to g3d-...@googlegroups.com
I think I got it, thanks a lot.

在 2013年5月5日星期日UTC+8上午8时11分21秒,Morgan McGuire写道:
Reply all
Reply to author
Forward
0 new messages