Jari Komppa
unread,Sep 16, 2013, 3:16:37 AM9/16/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sol...@googlegroups.com
I generally try to follow the following coding convention. (Sometimes
I slip from it, being lazy). I'd prefer if all code in the SoLoud
proper followed the same convention.
aAttribute (parameter)
mMemberVariable
gGlobalVariable
localVariable
CONSTANT_VALUE
functionName
ClassName
char *foo, bar, *baz;
int i;
for (i = 0; i < 10; i++)
{
if (i == 0 && gFoo > BAR)
{
foo();
}
}
switch (aFoo)
{
case 0:
bar(4 + x * (17 / y));
break;
}
In general, try to optimize for readability.
Use common sense.
When in doubt, write code that looks the same as the surrounding code.
In case of complex code, leave a comment, it'll save time from
everybody, including yourself, when you have to revisit the code.