-
Notifications
You must be signed in to change notification settings - Fork 12
Style Guide
This document is currently in progress, and will be added to as needed
All code files go in the src directory, organized based on what build targets rely on them. If they only apply to one target they go in the folder named after said target. Otherwise, they go in the common folder. Most of the time the source files will also be grouped into folders based on what they do. For example, most core networking-related code goes in src/common/networking. File names should match the class that is contained in them or the name of the most prominent class. Directory and file names should follow Camel Case, even though this will usually not match the capitalization of the class.
I currently haven't standardized the way I do the layout of classes. Usually, I just put private, protected, and then public members; all grouped by variables and then functions.
Private and protected variables are prefixed with an underscore: T _privateVariable
if(...)
{
}
while(...)
{
}
switch(...)
{
case ...:
return;
case ...:
...
break;
case ...:
{
...
break;
}
}
Just make it look nice, I'll add stuff here as I run into it.