5 ms·
In theory, if this is the case (or the case in other comments about null pointer use and such), you would/could write it as: bool cheap = cheapCheck(); b
by grok22 4y ago
In theory, if this is the case (or the case in other comments about null pointer use and such), you would/could write it as:
bool cheap = cheapCheck();
bool expensive = cheap && expensiveCheck();
if (expensive) { ... }