diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a2c3394d..057ee0bc3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,7 +39,7 @@ https://google.github.io/styleguide/cppguide.html * Use K&R placements of braces, read the Linux Kernel coding style document for clarifications * Always use spaces between keywords and opening brackets, i.e. `if ()`, `for ()`, `while ()` etc. * Indentation of switch/case statements is optional, but it's usually easier to read the code with indentations in place -* Use `std::string` instead of `char *` or `char []` unless there is a specific reason requiring the latter +* Use `std::string` or `std::vector` instead of `char *` or `char []` unless there is a specific reason requiring the latter * Actually, try to use C++ syntax in general instead of C syntax, another example would be `static_cast(someFloatVariable)` instead of `(int)someFloatVariable` * If the arguments (and initializer list) for a function or class exceeds 4 items, arrange them vertically to make the code easier to read * Always declare one variable per line, never combine multiple declarations of the same type diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index 72212368c..a6561d07f 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -216,7 +216,7 @@ bool SystemData::loadConfig() std::string path = getConfigPath(false); const std::string rompath = FileData::getROMDirectory(); - LOG(LogInfo) << "Loading system config file " << path << "..."; + LOG(LogInfo) << "Loading system configuration file " << path << "..."; if (!Utils::FileSystem::exists(path)) { LOG(LogWarning) << "es_systems.cfg does not exist."; diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index f991220ce..773c2bf4a 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -467,7 +467,7 @@ int main(int argc, char* argv[]) SDL_Event event; if (!window.init()) { - LOG(LogError) << "Window failed to initialize!"; + LOG(LogError) << "Window failed to initialize."; return 1; } diff --git a/es-core/src/Window.cpp b/es-core/src/Window.cpp index 84ec5a624..e759687d1 100644 --- a/es-core/src/Window.cpp +++ b/es-core/src/Window.cpp @@ -83,7 +83,7 @@ GuiComponent* Window::peekGui() bool Window::init() { if (!Renderer::init()) { - LOG(LogError) << "Renderer failed to initialize!"; + LOG(LogError) << "Renderer failed to initialize."; return false; } diff --git a/es-core/src/components/ButtonComponent.cpp b/es-core/src/components/ButtonComponent.cpp index a52216398..8f5b4e327 100644 --- a/es-core/src/components/ButtonComponent.cpp +++ b/es-core/src/components/ButtonComponent.cpp @@ -97,8 +97,7 @@ void ButtonComponent::render(const Transform4x4f& parentTrans) mBox.render(trans); - if (mTextCache) - { + if (mTextCache) { Vector3f centerOffset((mSize.x() - mTextCache->metrics.size.x()) / 2, (mSize.y() - mTextCache->metrics.size.y()) / 2, 0); trans = trans.translate(centerOffset); diff --git a/es-core/src/components/ImageGridComponent.h b/es-core/src/components/ImageGridComponent.h index a9fad3a94..309a22135 100644 --- a/es-core/src/components/ImageGridComponent.h +++ b/es-core/src/components/ImageGridComponent.h @@ -155,7 +155,7 @@ void ImageGridComponent::add(const std::string& name, const std::string& imag entry.object = obj; entry.data.texturePath = imagePath; - static_cast*>(this)->add(entry); + static_cast*>(this)->add(entry); mEntriesDirty = true; } diff --git a/es-core/src/components/TextListComponent.h b/es-core/src/components/TextListComponent.h index 83d3a9b2b..5c452679f 100644 --- a/es-core/src/components/TextListComponent.h +++ b/es-core/src/components/TextListComponent.h @@ -373,7 +373,7 @@ void TextListComponent::add(const std::string& name, const T& obj, unsigned i entry.name = name; entry.object = obj; entry.data.colorId = color; - static_cast*>(this)->add(entry); + static_cast*>(this)->add(entry); } template