]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/ObjectCacher.cc: use static_cast instead of C-Style cast
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 11 Mar 2013 13:38:24 +0000 (14:38 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 11 Mar 2013 13:38:24 +0000 (14:38 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osdc/ObjectCacher.cc

index 8d9269314f8e4f39ee4d0538a0e3cc06942d76db..5edc9c0ffd97381c7730a3729fab321c9310dfa2 100644 (file)
@@ -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<BufferHead*>(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<BufferHead*>(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<Object*>(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<BufferHead*>(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);