summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2007-07-25 20:24:14 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2007-07-25 20:24:14 (GMT)
commitc45322f6d0802aedd041cb710ad97e48db1db7bc (patch)
tree7a0c2e3d27196eaf09fee6b1039cd6b86fd5a453 /src/H5Tconv.c
parent5434dbbaa880b3278c393decbed4e1e8a9f766b6 (diff)
downloadhdf5-c45322f6d0802aedd041cb710ad97e48db1db7bc.zip
hdf5-c45322f6d0802aedd041cb710ad97e48db1db7bc.tar.gz
hdf5-c45322f6d0802aedd041cb710ad97e48db1db7bc.tar.bz2
[svn-r14015] Refactoring part of the code. Tested only on liberty because
the change is simple.
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index ad7d4a6..92dfdfc 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -2324,7 +2324,7 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
buf_stride = src->shared->size;
}
- if(priv->smembs_subset == H5T_SUBSET_SRC) {
+ if(priv->smembs_subset == H5T_SUBSET_SRC || priv->smembs_subset == H5T_SUBSET_DST) {
/* If the optimization flag is set to indicate source members are a subset and
* in the top of the destination, simply copy the source members to background buffer. */
xbuf = buf;
@@ -2348,29 +2348,6 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
xbuf += buf_stride;
xbkg += bkg_stride;
}
- } else if(priv->smembs_subset == H5T_SUBSET_DST) {
- /* If the optimization flag is set to indicate destination members are a subset
- * and in the top of the source, simply copy the source members to background
- * buffer. */
- xbuf = buf;
- xbkg = bkg;
-
- if(src->shared->size <= dst->shared->size)
- /* This is to deal with a very special situation when the fields and their
- * offset for both source and destination are identical but the datatype
- * sizes of source and destination are different.
- */
- copy_size = src->shared->size;
- else
- copy_size = dst->shared->size;
-
- for (elmtno=0; elmtno<nelmts; elmtno++) {
- HDmemmove(xbkg, xbuf, copy_size);
-
- /* Update pointers */
- xbuf += buf_stride;
- xbkg += bkg_stride;
- }
} else {
/*
* For each member where the destination is not larger than the