diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-02-05 23:52:28 +0100 |
---|---|---|
committer | Gary Lowell <glowell@inktank.com> | 2013-02-05 19:29:10 -0800 |
commit | f8ba745e2382dcea6492544f096136b31a4121e7 (patch) | |
tree | 7cfbaf9756778b72a89965c5255e3a8cb6bdb0b5 | |
parent | 1b70fc408c014403b4b466c8d19b26f1d84943a1 (diff) | |
download | ceph-f8ba745e2382dcea6492544f096136b31a4121e7.tar.gz |
include/xlist.h: fix C-style pointer casting
Replace C-style pointer casting with correct static_cast<>().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r-- | src/include/xlist.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/xlist.h b/src/include/xlist.h index 5c2bf03f856..5384561327a 100644 --- a/src/include/xlist.h +++ b/src/include/xlist.h @@ -132,8 +132,8 @@ public: assert((bool)_front == (bool)_size); } - T front() { return (T)_front->_item; } - T back() { return (T)_back->_item; } + T front() { return static_cast<T>(_front->_item); } + T back() { return static_cast<T>(_back->_item); } void pop_front() { assert(!empty()); @@ -149,7 +149,7 @@ public: item *cur; public: iterator(item *i = 0) : cur(i) {} - T operator*() { return (T)cur->_item; } + T operator*() { return static_cast<T>(cur->_item); } iterator& operator++() { assert(cur); assert(cur->_list); |