Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


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@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

Attachment: signature.asc
Description: Digital signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.