1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:07:34 +00:00

Everywhere: Remove a bunch of redundant 'AK::' namespace prefixes

This is basically just for consistency, it's quite strange to see
multiple AK container types next to each other, some with and some
without the namespace prefix - we're 'using AK::Foo;' a lot and should
leverage that. :^)
This commit is contained in:
Linus Groh 2021-02-25 21:10:47 +01:00 committed by Andreas Kling
parent be9df404fd
commit e265054c12
73 changed files with 111 additions and 110 deletions

View file

@ -54,10 +54,10 @@ public:
Function<void()> on_update;
private:
void handle_get_all_objects_response(const AK::JsonObject&);
void handle_identify_response(const AK::JsonObject&);
void handle_get_all_objects_response(const JsonObject&);
void handle_identify_response(const JsonObject&);
void send_request(const AK::JsonObject&);
void send_request(const JsonObject&);
pid_t m_pid { -1 };
String m_process_name;

View file

@ -87,7 +87,7 @@ Emulator::Emulator(const String& executable_path, const Vector<String>& argument
static constexpr FlatPtr userspace_range_ceiling = 0xbe000000;
#ifdef UE_ASLR
static constexpr FlatPtr page_mask = 0xfffff000u;
size_t random_offset = (AK::get_random<u8>() % 32 * MiB) & page_mask;
size_t random_offset = (get_random<u8>() % 32 * MiB) & page_mask;
FlatPtr base = userspace_range_base + random_offset;
#else
FlatPtr base = userspace_range_base;

View file

@ -81,7 +81,7 @@ Optional<Range> RangeAllocator::allocate_randomized(size_t size, size_t alignmen
// FIXME: I'm sure there's a smarter way to do this.
static constexpr size_t maximum_randomization_attempts = 1000;
for (size_t i = 0; i < maximum_randomization_attempts; ++i) {
VirtualAddress random_address { AK::get_random<FlatPtr>() };
VirtualAddress random_address { get_random<FlatPtr>() };
random_address.mask(PAGE_MASK);
if (!m_total_range.contains(random_address, size))