diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-02-06 12:02:49 +0100 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-06 08:42:03 -0800 |
commit | 22e48b5751f1d0b75d744cf57f5c322f6733c4cd (patch) | |
tree | 092aa4046291f901732d9698c942854a231ab256 | |
parent | d54bd1700fb5af6eb1d96acaf7b428133712496b (diff) | |
download | ceph-22e48b5751f1d0b75d744cf57f5c322f6733c4cd.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); |