diff --git a/CODING_STYLE.md b/CODING_STYLE.md index 6aea9183..baa7a019 100644 --- a/CODING_STYLE.md +++ b/CODING_STYLE.md @@ -19,8 +19,8 @@ SomeFeature.cpp SomeFeature.h ``` -Private/internal headers are postfixed with `_i` before the file extension. -Like `SomeFeature_i.h` +Private/internal headers are postfixed with `Private` before the file extension. +Like `SomeFeaturePrivate.h` ### Folders @@ -56,16 +56,28 @@ Preprocessor functions are written in snake-case and prefixed with `tt_`, for ex Consts are lower camel case with capital letters. -Typedefs for structs and datatype aliases are upper camel case. +Typedefs for structs, classes and datatype aliases are upper camel case. Examples: ```c++ -typedef uint32_t SomeAlias; +typedef uint32_t ThreadId; -const SomeAlias myAlias; +const ThreadId id; -typedef struct { +struct ThreadData { // ... -} SomeStruct; +}; +``` + +### Enumerations + +`enum class` or `enum struct` is preferred over plain `enum` because of scoping. It's styled like this: + +```c++ +enum class { + Ok, + NotSupported, + Error +}; ``` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47fd8117..56c27412 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,10 +1,11 @@ # Note -During the pre-alpha stage, contributions will not yet be considered. -Too many things are changing too rapidly: -I don't want to disappoint people with huge merge conflicts. +During the pre-alpha stage, the APIs are changing rapidly. +I don't want to disappoint people with huge merge conflicts, so new features are not accepted yet. + +I welcome fixes and possibly also board implementations: +Please open an [Issue](https://github.com/ByteWelder/Tactility/issues/new) on GitHub to discuss first new boards! # Code Style See [this document](CODING_STYLE.md). -