-
Notifications
You must be signed in to change notification settings - Fork 1
Code Guidelines
Tim Lane edited this page Nov 17, 2018
·
10 revisions
- Indentation brackets { and } should always be on a new line (for sake of consistency)
- Always add a copy constructor and assignment operator = overload to classes. By default these should be encapsulated as private so that copies may not be made (with some exceptions, e.g. classes that instantiate to objects with low-memory usage)
- Wrap new classes and files with the
ossiumnamespace. - Cache the count when doing for loops, e.g.
for (int i = 0, counti = myarray.GetSize(); i < counti; i++)
© Tim Lane 2018-2020