A Vector has been replaced.

This commit is contained in:
2025-03-13 22:26:15 -04:00
parent 9be23f8360
commit 40e2306664
3 changed files with 13 additions and 15 deletions

View File

@ -372,10 +372,10 @@ int a_Dialog_choice(const char *title, const char *msg, ...)
window->set_modal();
window->begin();
Fl_Text_Buffer *buf = new Fl_Text_Buffer();
auto buf = std::make_unique< Fl_Text_Buffer >();
buf->text(msg);
Fl_Text_Display *td = new Fl_Text_Display(0, 0, ww, wh - bh);
td->buffer(buf);
td->buffer(buf.get());
td->textsize((int) rint(14.0 * prefs.font_factor));
td->wrap_mode(Fl_Text_Display::WRAP_AT_BOUNDS, 0);
@ -400,8 +400,8 @@ int a_Dialog_choice(const char *title, const char *msg, ...)
while (window->shown())
Fl::wait();
_MSG("Dialog_choice answer = %d\n", answer);
td->buffer(NULL);
delete buf;
td->buffer(nullptr);
buf.reset();
window.reset();
return choice_answer;