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

index 84cf4cbd791d9b218ab58a579cf71a3a6997cea1..b9acf85de605fde98059c3486e01738446e9b221 100644 (file)
@@ -537,23 +537,23 @@ bool OSDMonitor::preprocess_query(PaxosServiceMessage *m)
   switch (m->get_type()) {
     // READs
   case MSG_MON_COMMAND:
-    return preprocess_command((MMonCommand*)m);
+    return preprocess_command(static_cast<MMonCommand*>(m));
 
     // damp updates
   case MSG_OSD_FAILURE:
-    return preprocess_failure((MOSDFailure*)m);
+    return preprocess_failure(static_cast<MOSDFailure*>(m));
   case MSG_OSD_BOOT:
-    return preprocess_boot((MOSDBoot*)m);
+    return preprocess_boot(static_cast<MOSDBoot*>(m));
   case MSG_OSD_ALIVE:
-    return preprocess_alive((MOSDAlive*)m);
+    return preprocess_alive(static_cast<MOSDAlive*>(m));
   case MSG_OSD_PGTEMP:
-    return preprocess_pgtemp((MOSDPGTemp*)m);
+    return preprocess_pgtemp(static_cast<MOSDPGTemp*>(m));
 
   case CEPH_MSG_POOLOP:
-    return preprocess_pool_op((MPoolOp*)m);
+    return preprocess_pool_op(static_cast<MPoolOp*>(m));
 
   case MSG_REMOVE_SNAPS:
-    return preprocess_remove_snaps((MRemoveSnaps*)m);
+    return preprocess_remove_snaps(static_cast<MRemoveSnaps*>(m));
     
   default:
     assert(0);
@@ -569,22 +569,22 @@ bool OSDMonitor::prepare_update(PaxosServiceMessage *m)
   switch (m->get_type()) {
     // damp updates
   case MSG_OSD_FAILURE:
-    return prepare_failure((MOSDFailure*)m);
+    return prepare_failure(static_cast<MOSDFailure*>(m));
   case MSG_OSD_BOOT:
-    return prepare_boot((MOSDBoot*)m);
+    return prepare_boot(static_cast<MOSDBoot*>(m));
   case MSG_OSD_ALIVE:
-    return prepare_alive((MOSDAlive*)m);
+    return prepare_alive(static_cast<MOSDAlive*>(m));
   case MSG_OSD_PGTEMP:
-    return prepare_pgtemp((MOSDPGTemp*)m);
+    return prepare_pgtemp(static_cast<MOSDPGTemp*>(m));
 
   case MSG_MON_COMMAND:
-    return prepare_command((MMonCommand*)m);
+    return prepare_command(static_cast<MMonCommand*>(m));
     
   case CEPH_MSG_POOLOP:
-    return prepare_pool_op((MPoolOp*)m);
+    return prepare_pool_op(static_cast<MPoolOp*>(m));
 
   case MSG_REMOVE_SNAPS:
-    return prepare_remove_snaps((MRemoveSnaps*)m);
+    return prepare_remove_snaps(static_cast<MRemoveSnaps*>(m));
 
   default:
     assert(0);