For more efficient code maintenance, I recommend to avoid C style casting (such as (struct struct_name *) void_ptr)
There are several reasons why C++ style casting should be used instead of C style casting. (Also mentioned in #56 too)
- C style castings are not checked at compile time and therefore causes some problem on runtime (And they are usually hard to debug)
- C++ style castings enhance the readability of the entire code by enabling searching code snippets by the common postfix
_cast.
- C++ style castings support more precise casting, based on the context.
For more efficient code maintenance, I recommend to avoid C style casting (such as
(struct struct_name *) void_ptr)There are several reasons why C++ style casting should be used instead of C style casting. (Also mentioned in #56 too)
_cast.