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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression Fix: RTP table mapping japanese <-> other #1579

Merged
merged 1 commit into from Dec 18, 2018

Conversation

Projects
None yet
4 participants
@Ghabry
Copy link
Member

Ghabry commented Dec 17, 2018

Maybe you remember how I fixed the 3DS crash by replacing std::string with const char* in the std::map of the rtp-table. The result of this change was that the function size was significantly reduced (which was probably the crash reason, function section too large???).

Turns out std::map doesn't implement a proper operator < for char* which means our table didn't work anymore 馃憥 .

Regression Fix: RTP table mapping japanese <-> other didn't work anym鈥
鈥re because const char* doesn't work like std::string

@Ghabry Ghabry added the FileFinder label Dec 17, 2018

@Ghabry Ghabry added this to the 0.6.0 (likely) milestone Dec 17, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor

fmatthew5876 commented Dec 17, 2018

map will use operator< for const char*, comparing the 2 pointers..

C++17 string_view is another option here if the strings don't need to be owned by the map.

@Ghabry

This comment has been minimized.

Copy link
Member Author

Ghabry commented Dec 17, 2018

map will use operator< for const char*, comparing the 2 pointers..

That's why C++ is a bad language ;)

@fmatthew5876
Copy link
Contributor

fmatthew5876 left a comment

maps of maps is going to be slow and waste memory, but until this is looked at properly I'm in favor of pushing the bugfix.

@carstene1ns carstene1ns merged commit 83c52d3 into EasyRPG:master Dec 18, 2018

7 checks passed

Android (armeabi-v7a) Build finished.
Details
GNU/Linux Build finished.
Details
OSX Build finished.
Details
Wii (SDL1) Build finished.
Details
Windows (x64) Build finished.
Details
Windows (x86) Build finished.
Details
web Build finished.
Details

@Ghabry Ghabry deleted the Ghabry:rtp-table branch Jan 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.