Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upBASE: Code formatting cleanup pass of base #984
Conversation
|
While this PR has number of indeed good changes, it still has few questionable ones or those which are matter of taste. I marked those, but taking into account number and diversity of touched files, I'm thinking about redoing it manually, unless those all are addressed. |
| @@ -54,8 +54,7 @@ static const char USAGE_STRING[] = | |||
| "%s: %s\n" | |||
| "Usage: %s [OPTIONS]... [GAME]\n" | |||
| "\n" | |||
| "Try '%s --help' for more options.\n" | |||
| ; | |||
This comment has been minimized.
This comment has been minimized.
| @@ -167,8 +166,7 @@ static const char HELP_STRING[] = | |||
| #endif | |||
| "\n" | |||
| "The meaning of boolean long options can be inverted by prefixing them with\n" | |||
| "\"no-\", e.g. \"--no-aspect-ratio\".\n" | |||
| ; | |||
| "\"no-\", e.g. \"--no-aspect-ratio\".\n"; | |||
This comment has been minimized.
This comment has been minimized.
| @@ -153,24 +153,24 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const | |||
| // needed because otherwise the g_system->getSupportedFormats might return | |||
| // bad values. | |||
| g_system->beginGFXTransaction(); | |||
| g_system->setGraphicsMode(ConfMan.get("gfx_mode").c_str()); | |||
This comment has been minimized.
This comment has been minimized.
sev-
Sep 3, 2017
Member
This is done on purpose, to visually set up code which is within the transaction.
| system.beginGFXTransaction(); | ||
| // Set the user specified graphics mode (if any). | ||
| system.setGraphicsMode(ConfMan.get("gfx_mode").c_str()); | ||
| // Set the user specified graphics mode (if any). |
This comment has been minimized.
This comment has been minimized.
| @@ -551,17 +553,17 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { | |||
| #ifndef FORCE_RTL | |||
| if (result.getCode() == Common::kNoError && !g_system->getEventManager()->shouldRTL()) | |||
| break; | |||
| #endif | |||
| #endif | |||
This comment has been minimized.
This comment has been minimized.
sev-
Sep 3, 2017
Member
Now, the #endif does not match the indentation of the #ifndef. Thus, either have both unindented, or do not make this change at all.
| @@ -589,7 +591,8 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { | |||
| ConfMan.setActiveDomain(""); | |||
| } | |||
|
|
|||
| PluginManager::instance().loadAllPlugins(); // only for cached manager | |||
| // only for cached manager | |||
This comment has been minimized.
This comment has been minimized.
| extern PluginType g_##ID##_type; \ | ||
| extern PluginObject *g_##ID##_getObject(); \ | ||
| pl.push_back(new StaticPlugin(g_##ID##_getObject(), g_##ID##_type)); | ||
| #define LINK_PLUGIN(ID) \ |
This comment has been minimized.
This comment has been minimized.
| // Plugin linking | ||
|
|
||
| #define STATIC_PLUGIN 1 | ||
| #define DYNAMIC_PLUGIN 2 | ||
|
|
||
| #define PLUGIN_ENABLED_STATIC(ID) \ | ||
| (ENABLE_##ID && !PLUGIN_ENABLED_DYNAMIC(ID)) | ||
| #define PLUGIN_ENABLED_STATIC(ID) (ENABLE_##ID && !PLUGIN_ENABLED_DYNAMIC(ID)) |
This comment has been minimized.
This comment has been minimized.
| @@ -325,13 +312,16 @@ class PluginManager { | |||
| public: | |||
| virtual ~PluginManager(); | |||
|
|
|||
| static void destroy() { delete _instance; _instance = 0; } | |||
This comment has been minimized.
This comment has been minimized.
sev-
Sep 3, 2017
Member
It is interesting like you split this oneliner while adding few right above.
| @@ -23,10 +23,10 @@ | |||
| #ifndef BASE_VERSION_H | |||
| #define BASE_VERSION_H | |||
|
|
|||
| extern const char *gScummVMVersion; // e.g. "0.4.1" | |||
This comment has been minimized.
This comment has been minimized.
|
@8BitPimp are you planning on continuing to work on this patch? |
|
@8BitPimp Any update? |
|
Still no updates? |
|
@8BitPimp Are you planning on updating this PR? |
|
Since there hasn't been any update for months I'm closing this for now, but feel free to reopen if you want to work on this PR again. |
bit-hack commentedAug 8, 2017
•
edited
This is a non-functional change, that cleans up some of the source formatting in base.
Please let me know if you spot anything that is not in keeping with established ScummVM format.
Also if anyone knows how to get github to display 4 space tabs, please let me know :)