Re: Replace Gtk::manage() with std::unique_ptr<>?



On 08/02/16 15:56 +0100, Murray Cumming wrote:
On Mon, 2016-02-08 at 15:44 +0100, Krzesimir Nowak wrote:
Just a minor hint here - Button* b {}; should do the trick and it is
not that lot more of typing.

Thanks. Whether we should now use curly brackets for "uniform
initialization" wherever possible is a whole other question we should
discuss eventually. It looks odd to me, but I accept that that's no
reason not to like it. I expect to get used to it.

Personally I continue using "= nullptr" for pointers. Uniform init is
great for generic code as it works for anything default constructible,
and great in many other situations, but to initialize a pointer to
null I think "= nullptr" is as clear and explicit as you can get.

But I'm not a gtkmm dev or even a gtkmm user, and YMMV :-)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]