-
Notifications
You must be signed in to change notification settings - Fork 8k
pdo_firebird: use UNEXPECTED
#14064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdo_firebird: use UNEXPECTED
#14064
Conversation
c3d8270
to
bb8a279
Compare
bb8a279
to
b65e5e8
Compare
a562f49
to
0e5fd50
Compare
EXPECTED
and UNEXPECTED
I decided not to include the change of if statement to switch in this PR. |
0e5fd50
to
ddb5572
Compare
EXPECTED
and UNEXPECTED
UNEXPECTED
case IS_NULL: | ||
/* complain if this field doesn't allow NULL values */ | ||
if (~var->sqltype & 1) { | ||
if (UNEXPECTED(~var->sqltype & 1)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Globally looks correct to me, maybe this one (and the one above) kind of look a bit much. Not sure if there is a real gain but that s nitpicking :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LCTM, not sure the nested ones are that useful but don't think it harms.
Maybe I'll cut down on the changes quite a bit. When refactoring BCMath, I noticed that there were many places where using UNEXPECTED actually made the code slower. The usage is correct and may have hindered compiler optimizations. |
After measuring properly and identifying the areas that are effective, I will open the PR again. |
No description provided.