commit | aa9daa1b9dfc74deb2ab4993f74ba61ee2712f73 | [log] [tgz] |
---|---|---|
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | Mon Dec 28 18:49:12 2015 +0100 |
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | Mon Feb 01 13:58:13 2016 +0100 |
tree | 2b83b2e2820dcb02bc5fada8a4db45bd36ef3ba2 | |
parent | 38f18698b3413bf3e608026aff519427af740335 [diff] |
tbf: Replace static casts by calls to as_ul_tbf/as_dl_tbf Currently casts from gprs_rlcmac_tbf to gprs_rlcmac_ul_tbf and gprs_rlcmac_dl_tbf are done by using static_cast. This doesn't provide protection against converting a gprs_rlcmac_ul_tbf pointer to a gprs_rlcmac_dl_tbf pointer and vice versa. This commit provides two functions as_ul_tbf and as_dl_tbf, that behave similar like dynamic_cast but use the direction field instead of RTTI. Sponsored-by: On-Waves ehf