Review Board 2.0.15


debug: create a Debug namespace

Review Request #351 - Created Dec. 21, 2010 and submitted

Information
Nathan Binkert
gem5
Reviewers
Default
ali, gblack, nate, stever
debug: create a Debug namespace

   
Ship it!
Posted (Dec. 21, 2010, 2:42 a.m.)
looks good
Posted (Dec. 21, 2010, 2:30 p.m.)



  
src/base/debug.hh (Diff revision 1)
 
 
It looks like we're not completely consistent on this, but I'd put the close brace in column 0, then put the comment after that, e.g.:

} // namespace Debug

I don't care much about C vs C++-style comments, but having the brace in column 0 seems much more natural since that's where it would be if we weren't commenting it.

Other than that nit (which applies several places), this looks good to me.
  1. I've been doing it this way for years :)  I think the reason that I decided to do it this way is that we chose to *not* have namespaces change the indention level.  I honestly don't care, but there are a ton of examples that look like this, so we should consciously decide on one and change them everywhere and document it.  (Since you brought it up, do you volunteer?  Offering code goes a hell of a long way in a coding debate :)
  2. Ask and ye shall receive... sometimes, anyway.  FYI, the '//' comments outnumbered the '/*' comments something like 79 to 54, but there was surprising variety in the details ('namespace Foo', 'end namespace Foo', 'Foo namespace').  But hey, stand back, I know regular expressions :-)
Ship it!
Posted (Jan. 4, 2011, 10:14 a.m.)