OpenTTD Source  12.0-beta2
cmd_helper.h File Reference

Go to the source code of this file.

Functions

template<typename T , uint S, uint N, typename U >
static T Extract (U v)
 Extracts a given type from a value. More...
 

Detailed Description

Helper functions to extract data from command parameters.

Definition in file cmd_helper.h.

Function Documentation

◆ Extract()

template<typename T , uint S, uint N, typename U >
static T Extract ( v)
inlinestatic

Extracts a given type from a value.

Template Parameters
TThe type of data we're looking for.
SThe offset in the data.
NThe amount of bits to read.
UThe type of data passed to us.
Parameters
vThe data to extract the value from.

Definition at line 24 of file cmd_helper.h.