[Opensim-dev] Wholesale reformatting of files (UNCLASSIFIED)

Maxwell, Douglas CIV USARMY ARL (US) douglas.maxwell3.civ at mail.mil
Fri May 29 11:54:14 UTC 2015


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: opensim-dev-bounces at opensimulator.org
[mailto:opensim-dev-bounces at opensimulator.org] On Behalf Of Melanie
Sent: Thursday, May 28, 2015 7:12 PM
To: opensim-dev at opensimulator.org
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
> Opensim-dev at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
_______________________________________________
Opensim-dev mailing list
Opensim-dev at opensimulator.org
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev

Classification: UNCLASSIFIED
Caveats: NONE


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5629 bytes
Desc: not available
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20150529/02309be2/attachment.bin>


More information about the Opensim-dev mailing list