AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)

Use this instead of uintptr_t throughout the codebase. This makes it
possible to pass a FlatPtr to something that has u32 and u64 overloads.
This commit is contained in:
Andreas Kling 2020-03-08 10:36:51 +01:00
parent b98d8ad5b0
commit b1058b33fb
Notes: sideshowbarker 2024-07-19 08:50:35 +09:00
36 changed files with 164 additions and 161 deletions

View file

@ -168,9 +168,9 @@ void Object::deferred_invoke(Function<void(Object&)> invokee)
void Object::save_to(JsonObject& json)
{
json.set("class_name", class_name());
json.set("address", (uintptr_t)this);
json.set("address", (FlatPtr)this);
json.set("name", name());
json.set("parent", (uintptr_t)parent());
json.set("parent", (FlatPtr)parent());
}
bool Object::set_property(const StringView& name, const JsonValue& value)