mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Conway <>
Subject Re: Review Request 45489: Replaced reinterpret_cast with static_cast in libprocess.
Date Wed, 30 Mar 2016 16:16:47 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated March 30, 2016, 4:16 p.m.)

Review request for mesos and Ben Mahler.


Use static_cast instead of dynamic_cast.

Summary (updated)

Replaced reinterpret_cast with static_cast in libprocess.

Repository: mesos

Description (updated)

Casting from a virtual base class to a child class should not be
done with reinterpret_cast. We could use dynamic_cast as well, but
that has a performance cost; in this case, we know exactly which
child class the pointer points to, so the performance cost and
additional safety offered by dynamic_cast is not necessary.

Diffs (updated)

  3rdparty/libprocess/src/process.cpp feaffa4334422ec3964f8d079f570061eaf390d2 


Testing (updated)

make check with GCC 5.3 and recent apple-clang.


Neil Conway

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message