mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
AK: Remove the ctype adapters and use the actual ctype functions instead
This finally takes care of the kind-of excessive boilerplate code that were the ctype adapters. On the other hand, I had to link `LibC/ctype.cpp` to the Kernel (for `AK/JsonParser.cpp` and `AK/Format.cpp`). The previous commit actually makes sense now: the `string.h` includes in `ctype.{h,cpp}` would require to link more LibC stuff to the Kernel when it only needs the `_ctype_` array of `ctype.cpp`, and there wasn't any string stuff used in ctype. Instead of all this I could have put static derivatives of `is_any_of()` in the concerned AK files, however that would have meant more boilerplate and workarounds; so I went for the Kernel approach.
This commit is contained in:
parent
f158cb27ea
commit
f0f6b09acb
8 changed files with 33 additions and 125 deletions
|
@ -223,7 +223,6 @@ set(VT_SOURCES
|
|||
../Libraries/LibVT/Line.cpp
|
||||
)
|
||||
|
||||
|
||||
set(KEYBOARD_SOURCES
|
||||
../Libraries/LibKeyboard/CharacterMap.cpp
|
||||
)
|
||||
|
@ -233,6 +232,10 @@ set(CRYPTO_SOURCES
|
|||
../Libraries/LibCrypto/Hash/SHA2.cpp
|
||||
)
|
||||
|
||||
set(C_SOURCES
|
||||
../Libraries/LibC/ctype.cpp
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
${KERNEL_SOURCES}
|
||||
${AK_SOURCES}
|
||||
|
@ -240,6 +243,7 @@ set(SOURCES
|
|||
${VT_SOURCES}
|
||||
${KEYBOARD_SOURCES}
|
||||
${CRYPTO_SOURCES}
|
||||
${C_SOURCES}
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option -DKERNEL")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue