HomeWildfire Games

Drops custom utf16 string implementation (from rP684), uses C++11 one.
AuditedrP26023

Description

Drops custom utf16 string implementation (from rP684), uses C++11 one.

Patch By: sera

Differential Revision: https://code.wildfiregames.com/D4223

Event Timeline

Freagarach raised a concern with this commit.Nov 30 2021, 10:46 AM
Freagarach added a subscriber: Freagarach.
KeyName.cpp
../../../source/ps/KeyName.cpp: In function ‘SDL_Scancode FindScancode(const CStr8&)’:
../../../source/ps/KeyName.cpp:92:22: error: ‘find_if’ is not a member of ‘std’
   92 |                 std::find_if(scancodemap.begin(), scancodemap.end(), [&keyname](const std::pair<int, std::vector<CStr>>& names) {
      |                      ^~~~~~~
../../../source/ps/KeyName.cpp: In lambda function:
../../../source/ps/KeyName.cpp:93:37: error: ‘find_if’ is not a member of ‘std’
   93 |                         return std::find_if(names.second.begin(), names.second.end(), [&keyname](const CStr& t) {
      |                                     ^~~~~~~
make[1]: *** [engine.make:352: obj/engine_Release/KeyName.o] Error 1
make: *** [Makefile:117: engine] Error 2
This commit now has outstanding concerns.Nov 30 2021, 10:46 AM
KeyName.cpp
../../../source/ps/KeyName.cpp: In function ‘SDL_Scancode FindScancode(const CStr8&)’:
../../../source/ps/KeyName.cpp:92:22: error: ‘find_if’ is not a member of ‘std’
   92 |                 std::find_if(scancodemap.begin(), scancodemap.end(), [&keyname](const std::pair<int, std::vector<CStr>>& names) {
      |                      ^~~~~~~
../../../source/ps/KeyName.cpp: In lambda function:
../../../source/ps/KeyName.cpp:93:37: error: ‘find_if’ is not a member of ‘std’
   93 |                         return std::find_if(names.second.begin(), names.second.end(), [&keyname](const CStr& t) {
      |                                     ^~~~~~~
make[1]: *** [engine.make:352: obj/engine_Release/KeyName.o] Error 1
make: *** [Makefile:117: engine] Error 2

I suppose without PCH on Linux? Because on Windows it works.

Stan added a subscriber: Stan.Nov 30 2021, 10:55 AM

Was pulling <algorithm> from utf16string.h can you try adding it to that file @Freagarach?

I suppose without PCH on Linux? Because on Windows it works.

Aye.

In rP26023#54527, @Stan wrote:

Was pulling <algorithm> from utf16string.h can you try adding it to that file @Freagarach?

Yep, that works.

vladislavbelov requested verification of this commit.Nov 30 2021, 7:04 PM
This commit now requires verification by auditors.Nov 30 2021, 7:04 PM
Freagarach accepted this commit.Nov 30 2021, 7:06 PM

r26026 Fixes my reported issue.

All concerns with this commit have now been addressed.Nov 30 2021, 7:06 PM