Skip to content

Commit

Permalink
[core:flags] Remove Unused allocator Parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dozn authored Feb 11, 2025
1 parent 584fdc0 commit b6aee4b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions core/flags/util.odin
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,19 @@ import "core:strings"
/*
Parse any arguments into an annotated struct or exit if there was an error.
*Allocates Using Provided Allocator*
This is a convenience wrapper over `parse` and `print_errors`.
Inputs:
- model: A pointer to an annotated struct.
- program_args: A slice of strings, usually `os.args`.
- style: The argument parsing style.
- allocator: (default: context.allocator)
- loc: The caller location for debugging purposes (default: #caller_location)
*/
@(optimization_mode="favor_size")
parse_or_exit :: proc(
model: ^$T,
program_args: []string,
style: Parsing_Style = .Odin,
allocator := context.allocator,
loc := #caller_location,
) {
assert(len(program_args) > 0, "Program arguments slice is empty.", loc)
Expand Down

0 comments on commit b6aee4b

Please sign in to comment.