1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

LibJS: Be a bit more explicit about sizeof(buf) / sizeof(FlatPtr)

This (seemingly) no-op cast communicates our intention to clang
This commit is contained in:
AnotherTest 2020-05-08 22:31:43 +04:30 committed by Andreas Kling
parent e333b60064
commit 0901b17126

View file

@ -135,7 +135,7 @@ void Heap::gather_conservative_roots(HashTable<Cell*>& roots)
const FlatPtr* raw_jmp_buf = reinterpret_cast<const FlatPtr*>(buf);
for (size_t i = 0; i < sizeof(buf) / sizeof(FlatPtr); i += sizeof(FlatPtr))
for (size_t i = 0; i < ((size_t)sizeof(buf)) / sizeof(FlatPtr); i += sizeof(FlatPtr))
possible_pointers.set(raw_jmp_buf[i]);
FlatPtr stack_base;