Files
test/source/blender/blenlib/intern/endian_switch.c
Campbell Barton c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00

90 lines
1.5 KiB
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup bli
*/
#include "BLI_endian_switch.h"
#include "BLI_sys_types.h"
#include "BLI_utildefines.h"
void BLI_endian_switch_int16_array(short *val, const int size)
{
if (size > 0) {
int i = size;
while (i--) {
BLI_endian_switch_int16(val++);
}
}
}
void BLI_endian_switch_uint16_array(unsigned short *val, const int size)
{
if (size > 0) {
int i = size;
while (i--) {
BLI_endian_switch_uint16(val++);
}
}
}
void BLI_endian_switch_int32_array(int *val, const int size)
{
if (size > 0) {
int i = size;
while (i--) {
BLI_endian_switch_int32(val++);
}
}
}
void BLI_endian_switch_uint32_array(unsigned int *val, const int size)
{
if (size > 0) {
int i = size;
while (i--) {
BLI_endian_switch_uint32(val++);
}
}
}
void BLI_endian_switch_float_array(float *val, const int size)
{
if (size > 0) {
int i = size;
while (i--) {
BLI_endian_switch_float(val++);
}
}
}
void BLI_endian_switch_int64_array(int64_t *val, const int size)
{
if (size > 0) {
int i = size;
while (i--) {
BLI_endian_switch_int64(val++);
}
}
}
void BLI_endian_switch_uint64_array(uint64_t *val, const int size)
{
if (size > 0) {
int i = size;
while (i--) {
BLI_endian_switch_uint64(val++);
}
}
}
void BLI_endian_switch_double_array(double *val, const int size)
{
if (size > 0) {
int i = size;
while (i--) {
BLI_endian_switch_double(val++);
}
}
}