[Ns-bugs] [Bug 1170] Formulate best practices for dealing with unused debug variables
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Thu Feb 16 06:59:30 PST 2012
https://www.nsnam.org/bugzilla/show_bug.cgi?id=1170
--- Comment #45 from Tom Henderson <tomh at tomh.org> 2012-02-16 09:59:29 EST ---
>
> 1) for simple NS_LOG and NS_ASSERT statements, avoid unnecessary
> declarations and try to make the statement self-contained. For example,
> prefer
>
> NS_ASSERT (obj->GetCount () == 0);
> to
> uint8_t tmp = obj->GetCount ();
> NS_ASSERT (tmp == 0);
>
> Please, note that obj->GetCount () has no side-effect and thus can be
> completely omitted in optimized builds.
Looks good to me, and if no other comments, I could update the wordpress page
accordingly and close this.
--
Configure bugmail: https://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs
mailing list