Partially done.

This commit is contained in:
2025-08-21 19:19:28 -04:00
parent 92d679e098
commit a41d0b067d
5 changed files with 23 additions and 30 deletions

View File

@ -2555,11 +2555,11 @@ void Textblock::addWidget (core::Widget *widget, core::style::Style *style)
* Return true on success, and false, when this anchor had already been
* added to the widget tree.
*/
bool Textblock::addAnchor (const char *name, core::style::Style *style)
bool Textblock::addAnchor (const std::string &name, core::style::Style *style)
{
DBG_OBJ_ENTER ("construct.word", 0, "addAnchor", "\"%s\", %p", name, style);
DBG_OBJ_ENTER ("construct.word", 0, "addAnchor", "\"%s\", %p", name.c_str(), style);
char *copy;
std::optional< std::string > copy;
int y;
bool result;
@ -2574,7 +2574,7 @@ bool Textblock::addAnchor (const char *name, core::style::Style *style)
} else
copy = Widget::addAnchor (name);
if (copy == NULL)
if (not copy.has_value())
/**
* \todo It may be necessary for future uses to save the anchor in
* some way, e.g. when parts of the widget tree change.