diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-05 21:52:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 21:52:30 (GMT) |
commit | 8253ab9ebf6a082dc07eb931f27b169d6a45d577 (patch) | |
tree | 47630856491e54f5d28e1608ffa5e2f976dc9c95 /src/H5Rint.c | |
parent | 920869796031ed4ee9c1fbea8aaccda3592a88b3 (diff) | |
download | hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.zip hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.gz hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.bz2 |
Convert hbool_t --> bool in src (#3496)
* hbool_t --> bool in src
* Does not remove TRUE/FALSE
* Public header files are unchanged
* Public API calls are unchanged
* TRUE/FALSE --> true/false in src
* Add deprecation notice for hbool_t
Diffstat (limited to 'src/H5Rint.c')
-rw-r--r-- | src/H5Rint.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/H5Rint.c b/src/H5Rint.c index 1e4b57e..c09b261 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -231,7 +231,7 @@ H5R__create_region(const H5O_token_t *obj_token, size_t token_size, H5S_t *space /* Create new reference */ ref->info.obj.filename = NULL; - if (NULL == (ref->info.reg.space = H5S_copy(space, FALSE, TRUE))) + if (NULL == (ref->info.reg.space = H5S_copy(space, false, true))) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy dataspace"); ref->loc_id = H5I_INVALID_HID; @@ -389,7 +389,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref) +H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, bool inc_ref, bool app_ref) { herr_t ret_value = SUCCEED; /* Return value */ @@ -471,7 +471,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id) /* TODO add search path */ /* Verify access property list and set up collective metadata if appropriate */ - if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0) + if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Get the VOL info from the fapl */ @@ -494,7 +494,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file"); /* Get an ID for the file */ - if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0) + if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, true)) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle"); /* Get the file object */ @@ -519,7 +519,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id) } /* end if */ /* Attach loc_id to reference */ - if (H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, FALSE, TRUE) < 0) + if (H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, false, true) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "unable to attach location id to reference"); done: @@ -554,14 +554,14 @@ H5R__get_type(const H5R_ref_priv_t *ref) * * Purpose: Compare two references * - * Return: TRUE if equal, FALSE if unequal, FAIL if error + * Return: true if equal, false if unequal, FAIL if error * *------------------------------------------------------------------------- */ htri_t H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2) { - htri_t ret_value = TRUE; + htri_t ret_value = true; FUNC_ENTER_PACKAGE @@ -570,21 +570,21 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2) /* Compare reference types */ if (ref1->type != ref2->type) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); /* Compare object addresses */ if (ref1->token_size != ref2->token_size) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); if (0 != memcmp(&ref1->info.obj.token, &ref2->info.obj.token, ref1->token_size)) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); /* Compare filenames */ if ((ref1->info.obj.filename && (NULL == ref2->info.obj.filename)) || ((NULL == ref1->info.obj.filename) && ref2->info.obj.filename)) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); if (ref1->info.obj.filename && ref1->info.obj.filename && (0 != HDstrcmp(ref1->info.obj.filename, ref2->info.obj.filename))) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); switch (ref1->type) { case H5R_OBJECT2: @@ -596,7 +596,7 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2) case H5R_ATTR: assert(ref1->info.attr.name && ref2->info.attr.name); if (0 != HDstrcmp(ref1->info.attr.name, ref2->info.attr.name)) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); break; case H5R_OBJECT1: case H5R_DATASET_REGION1: @@ -640,7 +640,7 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref) case H5R_OBJECT2: break; case H5R_DATASET_REGION2: - if (NULL == (dst_ref->info.reg.space = H5S_copy(src_ref->info.reg.space, FALSE, TRUE))) + if (NULL == (dst_ref->info.reg.space = H5S_copy(src_ref->info.reg.space, false, true))) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy dataspace"); break; case H5R_ATTR: @@ -671,9 +671,9 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref) /* Set location ID and hold reference to it */ dst_ref->loc_id = src_ref->loc_id; - if (H5I_inc_ref(dst_ref->loc_id, TRUE) < 0) + if (H5I_inc_ref(dst_ref->loc_id, true) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINC, FAIL, "incrementing location ID failed"); - dst_ref->app_ref = TRUE; + dst_ref->app_ref = true; } done: @@ -762,7 +762,7 @@ H5R__get_region(const H5R_ref_priv_t *ref, H5S_t *space) assert(space); /* Copy reference selection to destination */ - if (H5S_select_copy(space, ref->info.reg.space, FALSE) < 0) + if (H5S_select_copy(space, ref->info.reg.space, false) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy selection"); done: |