Skip to content

Commit

Permalink
simplify: many pugi-functions can now handle std::string
Browse files Browse the repository at this point in the history
  • Loading branch information
plc-user committed Jan 11, 2025
1 parent 2b3c070 commit bb2b5e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,10 @@ void ProcessElement(pugi::xml_node doc) {
if (!(doc.child("definition").child("uuid"))) {
if (_DEBUG_) std::cerr << "Erstelle Element-UUID!\n" ;
doc.child("definition").prepend_child("uuid");
doc.child("definition").child("uuid").append_attribute("uuid").set_value(("{" + CreateUUID(false) + "}").c_str());
doc.child("definition").child("uuid").append_attribute("uuid").set_value(("{" + CreateUUID(false) + "}"));
} else {
if (_DEBUG_) std::cerr << "Aktualisiere vorhandene Element-UUID!\n" ;
doc.child("definition").child("uuid").attribute("uuid").set_value(("{" + CreateUUID(false) + "}").c_str());
doc.child("definition").child("uuid").attribute("uuid").set_value(("{" + CreateUUID(false) + "}"));
}
// wenn die Anschlüsse alle weg sollen...
if (xRemoveAllTerminals==true) {
Expand Down Expand Up @@ -581,11 +581,11 @@ void ProcessElement(pugi::xml_node doc) {
{
if (((std::string(node.name())) == "terminal") && (xTerminalsUUIDsUnique == false)) {
std::string uuid = "{" + CreateUUID(false) + "}";
node.attribute("uuid").set_value(uuid.c_str());
node.attribute("uuid").set_value(uuid);
}
if (((std::string(node.name())) == "dynamic_text") && (xDynTextsUUIDsUnique == false)) {
std::string uuid = "{" + CreateUUID(false) + "}";
node.attribute("uuid").set_value(uuid.c_str());
node.attribute("uuid").set_value(uuid);
}
}
}
Expand Down

0 comments on commit bb2b5e5

Please sign in to comment.