Project

General

Profile

« Previous | Next » 

Revision 5f9c5638

Added by skyjake almost 7 years ago

Fixed|Refactor: Potential crash in release build

According to the C++ standard, compilers are allowed to assume that
the `this` pointer is never null. This may allow them to optimize
certain operations better. However, the libcore.h AS_IS methods were
not compatible with this assumption (and the C++ standard), so they
were replaced with de::maybeAs<> template methods.

As a bonus, classes using these cast macros have fewer methods since
only the as<> methods remain in the class.

IssueID #2249

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences