diff options
author | rubidium <rubidium@openttd.org> | 2011-05-01 19:14:12 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-05-01 19:14:12 +0000 |
commit | 1a515e6344028854c855671c19f49d8f869eb18f (patch) | |
tree | e1bba97c1a8fd80f564729cc2d5fc2049110cb2a /src/cmd_helper.h | |
parent | b27dd1dcd7375dae63724879eb0f56dd703e5312 (diff) | |
download | openttd-1a515e6344028854c855671c19f49d8f869eb18f.tar.xz |
(svn r22405) -Document: some more "random-ish" tidbits
Diffstat (limited to 'src/cmd_helper.h')
-rw-r--r-- | src/cmd_helper.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd_helper.h b/src/cmd_helper.h index 10060dd2d..9396dd414 100644 --- a/src/cmd_helper.h +++ b/src/cmd_helper.h @@ -14,6 +14,14 @@ #include "core/enum_type.hpp" +/** + * Extracts a given type from a value. + * @tparam T The type of data we're looking for. + * @tparam S The offset in the data. + * @tparam N The amount of bits to read. + * @tparam U The type of data passed to us. + * @param v The data to extract the value from. + */ template<typename T, uint S, uint N, typename U> static inline T Extract(U v) { /* Check if there are enough bits in v */ |