Skip to content

Make it possible to run ruisapp both as console and GUI app.#22

Merged
igagis merged 2 commits into
cppfw:mainfrom
zapolnov:nz_ruisapp_main
Jun 5, 2025
Merged

Make it possible to run ruisapp both as console and GUI app.#22
igagis merged 2 commits into
cppfw:mainfrom
zapolnov:nz_ruisapp_main

Conversation

@zapolnov
Copy link
Copy Markdown
Contributor

@zapolnov zapolnov commented Jun 4, 2025

No description provided.

Comment thread src/ruisapp/glue/windows/glue.cxx Outdated
return 0;
}

int main(int argc, char** argv)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here you can mark the argv argument as const char** and then no need to cast

Comment thread src/ruisapp/glue/windows/glue.cxx Outdated
{
// TODO: pass argc and argv
ruisapp::winmain(0, nullptr);
ruisapp::winmain(__argc, (const char**)__argv);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use C++-style cast and avoid using C-style cast here? I don't know what is the type of that__argv, if it is char** then I think it would implicitly do the const cast, or use const_cast() explicitly.

@igagis igagis self-assigned this Jun 5, 2025
@igagis igagis merged commit 49767b3 into cppfw:main Jun 5, 2025
0 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants