-
-
Notifications
You must be signed in to change notification settings - Fork 340
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
[Core] A little refactoring of loadcanvas.cpp #1956
Conversation
@@ -2284,6 +2284,13 @@ CanvasParser::parse_static_list(xmlpp::Element *element,Canvas::Handle canvas) | |||
return value_node; | |||
} | |||
|
|||
bool read_bool_attribute(xmlpp::Element* element, const char* name) { |
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.
-
prepend
static
-
Maybe rename to
is_bool_attribute_true()
orevaluate_bool_attribute()
When I readif (read_bool_attribute)
I have the impression I'm checking if it could read the attribute, not exactly evaluating its value.
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.
I have the impression I'm checking if it could read the attribute
This is the correct impression, because it tries to read the attribute and returns false
if it cannot read it (for example, the attribute was not found).
Maybe rename to is_bool_attribute_true()
Agree. This is more correct.
5bb2376
to
4b97318
Compare
4b97318
to
ada51af
Compare
Based on top of this PR (#1955)