Skip to content

Commit

Permalink
includes/std: Added std::mem::reached() for use with while-sized ar…
Browse files Browse the repository at this point in the history
…rays
  • Loading branch information
WerWolv committed Jul 10, 2024
1 parent 2f795fc commit bced518
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions includes/std/mem.pat
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ namespace auto std::mem {
return $ >= (std::mem::base_address() + std::mem::size());
};

/**
Function that returns true if the cursor position is at or beyond the given address
@param address The address to compare against
@return True if the cursor is at or beyond the given address
*/
fn reached(u128 address) {
return $ >= address;
};

/**
Aligns the given value to the given alignment
@param alignment The alignment to align to
Expand Down

0 comments on commit bced518

Please sign in to comment.