Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

SDK uses wrong declaration of argv in startup routines #7

Open
jherico opened this issue Jul 5, 2013 · 0 comments
Open

SDK uses wrong declaration of argv in startup routines #7

jherico opened this issue Jul 5, 2013 · 0 comments

Comments

@jherico
Copy link
Owner

jherico commented Jul 5, 2013

A number of places in the code attempt to work with command line arguments, normally passed in the form (int argc, char * argv), but incorrectly declare the second part as 'const char*' or 'const char * []'.

'X *' and 'const X *' are incontrovertible in both directions, and the existing convention of 'char **' for command line argument arrays should be used exclusively. See http://www.parashift.com/c++-faq-lite/constptrptr-conversion.html

Because these are declared incorrectly, any attempt to use the arguments with an existing library expecting 'char**' will fail with a compiler error (if your compiler isn't broken and/or hopelessly permissive).

This means that the Application::OnStartup(int, const char **) method in the Sample/CommonSrc/Platform files should be fixed as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant