mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Some minor cosmetic code changes.
This commit is contained in:
parent
d512c2b11d
commit
9da16dd00e
|
@ -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<char>` 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<int>(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
|
||||
|
|
|
@ -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.";
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue