From: Danny Al-Gaaf Date: Mon, 11 Mar 2013 13:38:24 +0000 (+0100) Subject: osdc/ObjectCacher.cc: use static_cast instead of C-Style cast X-Git-Tag: v0.60~106^2~22 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=75531a100ecd5e04aa8dbdfe78e7deb39b68199b;p=ceph.git osdc/ObjectCacher.cc: use static_cast instead of C-Style cast Signed-off-by: Danny Al-Gaaf --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 8d9269314f8e..5edc9c0ffd97 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -868,7 +868,7 @@ void ObjectCacher::flush(loff_t amount) */ loff_t did = 0; while (amount == 0 || did < amount) { - BufferHead *bh = (BufferHead*) bh_lru_dirty.lru_get_next_expire(); + BufferHead *bh = static_cast(bh_lru_dirty.lru_get_next_expire()); if (!bh) break; if (bh->last_write > cutoff) break; @@ -891,7 +891,7 @@ void ObjectCacher::trim(loff_t max_bytes, loff_t max_ob) << dendl; while (get_stat_clean() > max_bytes) { - BufferHead *bh = (BufferHead*) bh_lru_rest.lru_expire(); + BufferHead *bh = static_cast(bh_lru_rest.lru_expire()); if (!bh) break; @@ -909,7 +909,7 @@ void ObjectCacher::trim(loff_t max_bytes, loff_t max_ob) } while (ob_lru.lru_get_size() > max_ob) { - Object *ob = (Object*)ob_lru.lru_expire(); + Object *ob = static_cast(ob_lru.lru_expire()); if (!ob) break; @@ -1357,7 +1357,7 @@ void ObjectCacher::flusher_entry() utime_t cutoff = ceph_clock_now(cct); cutoff -= max_dirty_age; BufferHead *bh = 0; - while ((bh = (BufferHead*)bh_lru_dirty.lru_get_next_expire()) != 0 && + while ((bh = static_cast(bh_lru_dirty.lru_get_next_expire())) != 0 && bh->last_write < cutoff) { ldout(cct, 10) << "flusher flushing aged dirty bh " << *bh << dendl; bh_write(bh);