-
Notifications
You must be signed in to change notification settings - Fork 54
Don't safeguard empty strings while reading #1223
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
Don't safeguard empty strings while reading #1223
Conversation
| enum class SetAttributeMode : char | ||
| { | ||
| WhileReadingAttributes, | ||
| FromPublicAPICall |
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.
Is that public API call both read and write? Might need a doxygen string, even though its readable already :)
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.
Ah, Set... so write
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.
It's write-only in the public API, but during parsing, we emulate read_write mode and use setAttribute also internally
| key, value, internal::SetAttributeMode::FromPublicAPICall); | ||
| } | ||
|
|
||
| // TODO explicitly instantiate Attributable::setAttribute for all T in Datatype |
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.
This is done in src/backend/Attributable.cpp
| // TODO explicitly instantiate Attributable::setAttribute for all T in Datatype | |
| // note: we explicitly instantiate Attributable::setAttributeImpl for all T in Datatype in Attributable.cpp |
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.
added to 2nd commit.
ax3l
left a comment
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.
Thank you, LGTM :)
|
Will fix merge conflict from the merge of #1226 |
b0cfdcd to
1be5918
Compare
|
I have trouble backporting this to the |
|
Applied to |
This is a workaround/fix for #1221