aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/types
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-11 10:05:37 -0800
committerJosh Blum <josh@joshknows.com>2011-02-11 10:05:37 -0800
commit68e4a34d4381ad4d75f1c75ee67a23c95d747986 (patch)
tree0ceb9269a92458de70fea282b78f77ad193986cb /host/lib/types
parent3e7284014cb04bc66ae50004267aed4e4ada2d14 (diff)
downloaduhd-68e4a34d4381ad4d75f1c75ee67a23c95d747986.tar.gz
uhd-68e4a34d4381ad4d75f1c75ee67a23c95d747986.tar.bz2
uhd-68e4a34d4381ad4d75f1c75ee67a23c95d747986.zip
uhd: tweak for io type size table code
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 */
}