A Vector has been replaced.
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user