Skip to content

clang-tidy: remove pessimising const #35

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

Merged
merged 1 commit into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libxml++/attributenode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ustring AttributeNode::get_value() const
else
value = xmlGetNoNsProp(cobj()->parent, cobj()->name);

const ustring retn = value ? (const char*)value : "";
ustring retn = value ? (const char*)value : "";
if (value)
xmlFree(value);
return retn;
Expand Down
2 changes: 1 addition & 1 deletion libxml++/nodes/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ xmlpp::ustring eval_common_to_string(const xmlpp::ustring& xpath,
xmlXPathFreeObject(xpath_value);
if (result)
{
const xmlpp::ustring uresult(reinterpret_cast<const char*>(result));
xmlpp::ustring uresult(reinterpret_cast<const char*>(result));
xmlFree(result);
return uresult;
}
Expand Down
2 changes: 1 addition & 1 deletion libxml++/parsers/textreader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ ustring TextReader::PropertyReader::String(xmlChar* value, bool free)
if (!value)
return ustring();

const ustring result = (char *)value;
ustring result = (char *)value;

if(free)
xmlFree(value);
Expand Down