Classification: UNCLASSIFIED Caveats: NONE Roger that Melanie, we will adjust accordingly for code drop #4.
v/r -doug Douglas Maxwell Science and Technology Manager Virtual World Strategic Applications U.S. Army Research Lab Simulation & Training Technology Center (STTC) (c) (407) 242-0209 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Melanie Sent: Thursday, May 28, 2015 7:12 PM To: [email protected] Subject: Re: [Opensim-dev] Wholesale reformatting of files (UNCLASSIFIED) OpenSim coding standards mandate this is written as: if (sp == null) m_log.WarnFormat("[SCENE PRESENCE]: Did not find presence with id {0} in {1} before timeout", agentID, RegionInfo.RegionName); or if (sp == null) { m_log.WarnFormat("[SCENE PRESENCE]: Did not find presence with id {0} in {1} before timeout", agentID, RegionInfo.RegionName); } or if (sp == null) { m_log.WarnFormat("[SCENE PRESENCE]: Did not find presence with id {0} in {1} before timeout", agentID, RegionInfo.RegionName); } Never use K&R Style indentations, the open brace appears on it's own line always unless it's an array initialization. There it may be on the same line as the identified if the initializer fits on the same line, including it's closed brace. Apart from the above case, the open brace and it's corresponding closed brace have the same indentation level. Also, no spaces are placed between the name of a method and it's open parenthesis, nor between the open parenthesis and the first argument, nor before the closing parenthesis. A space is placed before the open parenthesis of built-ins that change the flow of execution, that is if, do, while, lock, etc. If arguments are broken over multiple lines, the indentation of the continuation lines is to be at least 8 spaces but may be more to align arguments to complex methods vertically. See above. - Melanie On 29/05/2015 00:18, M.E. Verhagen wrote: > The code looks ok, but a bit stange. > > if (sp == null) m_log.WarnFormat( "[SCENE PRESENCE]: Did not find > presence with id {0} in {1} before timeout", agentID, > RegionInfo.RegionName); I would rather write this on one line: > if (sp == null) m_log.WarnFormat("[SCENE PRESENCE]: Did not find > presence with id {0} in {1} before timeout", agentID, > RegionInfo.RegionName); Or break it up in multiple lines like this: > (with on every line an other parameter if it makes the code better > readable) > > if (sp == null) { m_log.WarnFormat( "[SCENE PRESENCE]: Did not find > presence with id {0} in {1} before timeout", agentID, > RegionInfo.RegionName); } > > > > > _______________________________________________ > Opensim-dev mailing list > [email protected] > http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev _______________________________________________ Opensim-dev mailing list [email protected] http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev Classification: UNCLASSIFIED Caveats: NONE
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Opensim-dev mailing list [email protected] http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
