Skip to content

Commit

Permalink
Remove unused util_endian_flip_vector_old
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed May 29, 2024
1 parent 98fb1f1 commit f430893
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions lib/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,42 +189,6 @@ void util_endian_flip_vector(void *data, int element_size, int elements) {
}
}

void util_endian_flip_vector_old(void *data, int element_size, int elements) {
int i;
switch (element_size) {
case (1):
break;
case (2): {
uint16_t *tmp_int = (uint16_t *)data;

for (i = 0; i < elements; i++)
tmp_int[i] = FLIP16(tmp_int[i]);
break;
}
case (4): {
uint32_t *tmp_int = (uint32_t *)data;

for (i = 0; i < elements; i++)
tmp_int[i] = FLIP32(tmp_int[i]);

break;
}
case (8): {
uint64_t *tmp_int = (uint64_t *)data;

for (i = 0; i < elements; i++)
tmp_int[i] = FLIP64(tmp_int[i]);
break;
}
default:
fprintf(stderr, "%s: current element size: %d \n", __func__,
element_size);
util_abort(
"%s: can only endian flip 1/2/4/8 byte variables - aborting \n",
__func__);
}
}

#ifndef S_ISDIR
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG)
Expand Down

0 comments on commit f430893

Please sign in to comment.