mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Restructure source directory
Introducing a directory structure to make it a bit less daunting for new developers and perhaps even old hands. The main folders all start with an upper character, so src files are now located in; * Core - Core data structures * Gui - Main GUI elements * Metrics - Models and Metrics * FileIO - Device and File I/O * Charts - All the chart types * Cloud - Working with Web Resources * Train - Anything Train View specific * ANT - Our ANT+ Stack * Resources - Images, Translations, Web etc Apologies to anyone who needs to merge across this update.
This commit is contained in:
33
doc/user/style.txt
Normal file
33
doc/user/style.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
GoldenCheetah Coding Style Guidelines
|
||||
|
||||
I don't like coding conventions, and I would prefer GoldenCheetah had as few
|
||||
of them as possible. The ones below, however, seem prudent. Please follow
|
||||
them when possible. -- Sean
|
||||
|
||||
- Use spaces instead of tabs.
|
||||
|
||||
- Do not end lines with whitespace. End every file with a newline.
|
||||
Otherwise git becomes angry.
|
||||
|
||||
- Avoid "using namespace ..." in header files.
|
||||
|
||||
- Don't declare global variables in header files. If you must use a global
|
||||
variable, declare it "static" withing a .cpp file.
|
||||
|
||||
- Only call C++'s operator new within the constructors and reset() functions
|
||||
of std::auto_ptr, boost::scoped_pointer, etc. or when passing a parent
|
||||
pointer to a Qt class (so that the parent deletes the child). Never call
|
||||
delete explicitly.
|
||||
|
||||
- Do not use malloc or free unless forced to by an external C library.
|
||||
|
||||
- Allocate large buffers on the heap, not on the stack.
|
||||
|
||||
- When the C++ standard library has an appropriate function, use it.
|
||||
Likewise for Qt and Boost.
|
||||
|
||||
- Only use external libraries with GPL-compatible licenses.
|
||||
|
||||
- Avoid C-style casts.
|
||||
|
||||
Reference in New Issue
Block a user