Closed pixelflinger closed 1 month ago
LGTM. Just an observation: if a user does this:
FILAMENT_CHECK_POSTCONDITION(false);
Then we get an empty "reason" string. I wonder if there's a way we can require users to provide a message (if we even want to require it) at compile time. Or, maybe we could provide a default message.
interesting idea. I think we probably can provide the stringified condition. I will give it a shot.
going forward, instead of using the printf style syntax for panics we use the c++ stream syntax
The new macros that replace ASSERT_*CONDITON are
FILAMENT_CHECK_PRECONDITON FILAMENT_CHECK_POSTCONDITION FILAMENT_CHECK_ARITIHMETIC
Example usage:
FILAMENT_CHECK_PRECONDITON(condition) << "Message";
The effect is exactly the same as before, but it'll let clients use Abseil's logging facilities.