Partially done.
This commit is contained in:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user