mirror of https://github.com/mgba-emu/mgba.git
GBA: Remove struct partial initialization for structs that are initialized later
This commit is contained in:
parent
22f4b1fef9
commit
c1261a5b74
|
@ -60,6 +60,7 @@ bool parseArguments(struct GBAArguments* opts, struct GBAConfig* config, int arg
|
||||||
"g"
|
"g"
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
memset(opts, 0, sizeof(*opts));
|
||||||
if (subparser && subparser->extraOptions) {
|
if (subparser && subparser->extraOptions) {
|
||||||
// TODO: modularize options to subparsers
|
// TODO: modularize options to subparsers
|
||||||
strncat(options, subparser->extraOptions, sizeof(options) - strlen(options) - 1);
|
strncat(options, subparser->extraOptions, sizeof(options) - strlen(options) - 1);
|
||||||
|
|
|
@ -61,7 +61,7 @@ int main(int argc, char** argv) {
|
||||||
};
|
};
|
||||||
GBAConfigLoadDefaults(&config, &opts);
|
GBAConfigLoadDefaults(&config, &opts);
|
||||||
|
|
||||||
struct GBAArguments args = {};
|
struct GBAArguments args;
|
||||||
if (!parseArguments(&args, &config, argc, argv, &subparser)) {
|
if (!parseArguments(&args, &config, argc, argv, &subparser)) {
|
||||||
usage(argv[0], PERF_USAGE);
|
usage(argv[0], PERF_USAGE);
|
||||||
freeArguments(&args);
|
freeArguments(&args);
|
||||||
|
|
|
@ -31,7 +31,7 @@ GBAApp::GBAApp(int& argc, char* argv[])
|
||||||
m_window.show();
|
m_window.show();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GBAArguments args = {};
|
GBAArguments args;
|
||||||
if (m_configController.parseArguments(&args, argc, argv)) {
|
if (m_configController.parseArguments(&args, argc, argv)) {
|
||||||
m_window.argumentsPassed(&args);
|
m_window.argumentsPassed(&args);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -52,8 +52,8 @@ int main(int argc, char** argv) {
|
||||||
};
|
};
|
||||||
GBAConfigLoadDefaults(&config, &opts);
|
GBAConfigLoadDefaults(&config, &opts);
|
||||||
|
|
||||||
struct GBAArguments args = {};
|
struct GBAArguments args;
|
||||||
struct GraphicsOpts graphicsOpts = {};
|
struct GraphicsOpts graphicsOpts;
|
||||||
|
|
||||||
struct SubParser subparser;
|
struct SubParser subparser;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue