OpenTTD Source: src/core/endian_func.hpp File Reference

OpenTTD Source 15.3

Functions
endian_func.hpp File Reference

Function to handling different endian machines. More...

`#include "bitmath_func.hpp"`

Go to the source code of this file.

## Functions
static constexpr uint16_t | FROM_BE16 (uint16_t x)
static constexpr uint32_t | FROM_BE32 (uint32_t x)
static constexpr uint16_t | TO_BE16 (uint16_t x)
static constexpr uint32_t | TO_BE32 (uint32_t x)
static constexpr uint16_t | FROM_LE16 (uint16_t x)
static constexpr uint32_t | FROM_LE32 (uint32_t x)
static constexpr uint16_t | TO_LE16 (uint16_t x)
static constexpr uint32_t | TO_LE32 (uint32_t x)

## Detailed Description

Function to handling different endian machines.

Definition in file endian_func.hpp.

## Function Documentation

## ◆ FROM_BE16()

static constexpr uint16_t FROM_BE16 | ( | uint16_t | x | ) |
| staticconstexpr

Definition at line 15 of file endian_func.hpp.

## ◆ FROM_BE32()

static constexpr uint32_t FROM_BE32 | ( | uint32_t | x | ) |
| staticconstexpr

Definition at line 21 of file endian_func.hpp.

## ◆ FROM_LE16()

static constexpr uint16_t FROM_LE16 | ( | uint16_t | x | ) |
| staticconstexpr

Definition at line 39 of file endian_func.hpp.

## ◆ FROM_LE32()

static constexpr uint32_t FROM_LE32 | ( | uint32_t | x | ) |
| staticconstexpr

Definition at line 45 of file endian_func.hpp.

## ◆ TO_BE16()

static constexpr uint16_t TO_BE16 | ( | uint16_t | x | ) |
| staticconstexpr

Definition at line 27 of file endian_func.hpp.

## ◆ TO_BE32()

static constexpr uint32_t TO_BE32 | ( | uint32_t | x | ) |
| staticconstexpr

Definition at line 33 of file endian_func.hpp.

## ◆ TO_LE16()

static constexpr uint16_t TO_LE16 | ( | uint16_t | x | ) |
| staticconstexpr

Definition at line 51 of file endian_func.hpp.

## ◆ TO_LE32()

static constexpr uint32_t TO_LE32 | ( | uint32_t | x | ) |
| staticconstexpr

Definition at line 57 of file endian_func.hpp.