mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-03 04:50:29 +00:00
Use decltype(sizeof(void*)) as a facsimile for std::size_t.
Clang demands that the size argument to the various operator new()'s to be exactly whatever it thinks std::size_t is. Since we can't include STL headers, this little trick will do.
This commit is contained in:
parent
dd502bb54e
commit
fb8a1186f6
Notes:
sideshowbarker
2024-07-19 16:09:17 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/fb8a1186f6f
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ typedef signed short signed_word;
|
|||
typedef signed int signed_dword;
|
||||
typedef signed long long int signed_qword;
|
||||
|
||||
typedef unsigned long size_t;
|
||||
typedef decltype(sizeof(void*)) size_t;
|
||||
typedef long ssize_t;
|
||||
|
||||
static_assert(sizeof(size_t) == sizeof(dword));
|
||||
|
|
Loading…
Reference in a new issue