[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/vcl vcl/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Jan 22 01:41:18 PST 2015


Hi Tobias,

[ Taking back the discussion to the list, so Noel and others can jump
in. ]

On Thu, Jan 22, 2015 at 10:20:59AM +0100, Tobias Madl <tobias.madl.dev at gmail.com> wrote:
> Replacing sounds good, but i have to change it in every single file, that
> uses them, so there is the question if this work is really that usefull....
> (but if you prefer to replace it i will do :)

If you change IdlePriority to a C++11 enum class, you have to adjust all
the clients anyway. *If* you do that, then removing the now redundant
prefix makes sense, I would say.

> I had the same idea with the static cast, but last time i wanted to use one
> noel said no ^^ So is it ok, or not?

static_cast<> is not always safe (that's difference between
dynamic_cast<> and static_cast<>), but static_casting an enum class to
an int value is always safe, AFAIK. I would certainly choose that if it
helps avoiding repeating yourself, which is the case here.

Regards,

Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150122/61459819/attachment.sig>


More information about the LibreOffice mailing list