conclusion
USE C++ STYLE CAST
⭕️ static_cast<float>(_value)
❌ (float)_value
reasons
- C++ style cast can be check in compile time.
- C++ style cast is more spotted easily!
reference
Is there any reason to prefer static_cast<>
over C style casting? Are they equivalent? Is there any sort of speed difference?
Top comments (0)