mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Review Request 52025: Replaced unchecked `dynamic_cast` with `static_cast`.
Date Mon, 19 Sep 2016 10:18:45 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52025/
-----------------------------------------------------------

Review request for mesos.


Repository: mesos


Description
-------

`Process` is a CRTP class where we know that `T` is a valid derived
class. Also, it is customary to use `static_cast` when implementing
CRTP methods.

This change uses a `static_cast` instead of a `dynamic_cast`;
`dynamic_cast` can result in a `nullptr` which should be checked. Here
this is not required, so `static_cast` is good enough for this use
case.


Diffs
-----

  3rdparty/libprocess/include/process/process.hpp 54c7d2e7ed3923ab15ab86e36552b023f9de5215


Diff: https://reviews.apache.org/r/52025/diff/


Testing
-------

make check (OS X, clang/trunk w/o optimizations)


Thanks,

Benjamin Bannier


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