Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multichar character constant warning #5787

Merged
merged 1 commit into from
Jul 19, 2016

Conversation

akien-mga
Copy link
Member

Multi-character character constants are implementation defined,
and therefore they are risky to use for use when trying to be compatible
with so many different platforms. Fixes #2540.

I made sure my conversions were correct with:

    print_line(itos(0x31545844)); print_line(itos('1TXD'));
    print_line(itos(0x33545844)); print_line(itos('3TXD'));
    print_line(itos(0x35545844)); print_line(itos('5TXD'));
    print_line(itos(0x31495441)); print_line(itos('1ITA'));
    print_line(itos(0x32495441)); print_line(itos('2ITA'));

Which prints on my system:

    827611204
    827611204
    861165636
    861165636
    894720068
    894720068
    826889281
    826889281
    843666497
    843666497

Multi-character character constants are implementation defined,
and therefore they are risky to use for use when trying to be compatible
with so many different platforms. Fixes godotengine#2540.
@akien-mga akien-mga added this to the 2.1 milestone Jul 18, 2016
@akien-mga akien-mga merged commit 1f519e7 into godotengine:master Jul 19, 2016
@akien-mga akien-mga deleted the pr-fix-warnings branch October 9, 2016 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant