aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/types
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2011-02-14 22:01:53 -0800
committerPhilip Balister <philip@opensdr.com>2011-02-14 22:01:53 -0800
commitf157f0ba340b5bee85965881b25a3861a099b7bb (patch)
tree19bf9c0bcff6e2884438db09ca3ff74128b1f0ba /host/lib/types
parentc9b3cb60e1559a5ea583bbef184a3c76ccb51a21 (diff)
parent85a1575d83505d4d2770e5754bee207181ba0f8a (diff)
downloaduhd-f157f0ba340b5bee85965881b25a3861a099b7bb.tar.gz
uhd-f157f0ba340b5bee85965881b25a3861a099b7bb.tar.bz2
uhd-f157f0ba340b5bee85965881b25a3861a099b7bb.zip
Merge branch 'next' of ettus.sourcerepo.com:ettus/uhdpriv into next
Diffstat (limited to 'host/lib/types')
-rw-r--r--host/lib/types/types.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/host/lib/types/types.cpp b/host/lib/types/types.cpp
index bf308a0b3..7c65d2997 100644
--- a/host/lib/types/types.cpp
+++ b/host/lib/types/types.cpp
@@ -76,17 +76,16 @@ static std::vector<size_t> get_tid_size_table(void){
return table;
}
-static size_t tid_to_size(io_type_t::tid_t tid){
- static const std::vector<size_t> size_table(get_tid_size_table());
- return size_table[size_t(tid) & 0x7f];
-}
+static const std::vector<size_t> tid_size_table(get_tid_size_table());
-io_type_t::io_type_t(tid_t tid)
-: size(tid_to_size(tid)), tid(tid){
+io_type_t::io_type_t(tid_t tid):
+ size(tid_size_table[size_t(tid) & 0x7f]), tid(tid)
+{
/* NOP */
}
-io_type_t::io_type_t(size_t size)
-: size(size), tid(CUSTOM_TYPE){
+io_type_t::io_type_t(size_t size):
+ size(size), tid(CUSTOM_TYPE)
+{
/* NOP */
}