Skip to content

Remove int vector type - #1278

Draft
eivindjahren wants to merge 12 commits into
mainfrom
remove_int_vector_type
Draft

eivindjahren wants to merge 12 commits into
mainfrom
remove_int_vector_type

Conversation

@eivindjahren

Copy link
Copy Markdown
Collaborator

No description provided.

@eivindjahren
eivindjahren force-pushed the remove_int_vector_type branch from c2193b3 to 128c386 Compare August 25, 2026 11:12
@eivindjahren
eivindjahren force-pushed the remove_int_vector_type branch 12 times, most recently from 622436f to beb815a Compare August 25, 2026 12:13
eivindjahren and others added 9 commits August 25, 2026 14:24
The only user of util_fread_dev_urandom was create_test_path in
test_work_area, which needs an arbitrary suffix for a scratch
directory rather than cryptographically secure randomness.

Reading /dev/urandom is also not portable, so use std::rand seeded
from the current time instead and drop the utility function.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
basic_parser_fseek_string reads characters with fgetc, which returns
an int so that EOF (-1) is distinguishable from every valid byte.
That int was passed to is_in_quoters, which took a char, so EOF was
narrowed to 0xFF and could compare equal to a legitimate 0xFF quoter
byte. fseek_quote_end had the same problem for its quoter argument.

Take an int in both and test for EOF explicitly before comparing.
rd_region_select_from_box__ treats the values it gets from rd_box as
global indices, but rd_box::active_list returned active indices. The
two only coincide when every cell in the grid is active, so a box over
a grid with inactive cells selected the wrong cells, and cells that
were inactive could not be selected at all.

This was introduced in 9685ae0, where the call to
ecl_box_get_global_list was translated to a member named active_list.

rd_box only ever needs the global list, so drop the active list and
rename the accessor to global_list to match what it returns.
This involved applying the convention that size_t is validated
to be non-negative in a lot of contexts. It still uses int for
rd_kw as that represents a size written as signed int32 to
a file.
Removes some remaining usages of int_vector_type and removes it
@eivindjahren
eivindjahren force-pushed the remove_int_vector_type branch from beb815a to bb9a500 Compare August 25, 2026 12:45

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant