<div dir="ltr"><div><div><div>So i replaced it with a static cast now :)<br><br></div>But i don't get the thing with changing it to a C++11 enum class. It is already an enum class ????<br><br></div>Cheers<br><br></div>Tobi<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 22, 2015 at 10:41 AM, Miklos Vajna <span dir="ltr"><<a href="mailto:vmiklos@collabora.co.uk" target="_blank">vmiklos@collabora.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Tobias,<br>
<br>
[ Taking back the discussion to the list, so Noel and others can jump<br>
in. ]<br>
<span class=""><br>
On Thu, Jan 22, 2015 at 10:20:59AM +0100, Tobias Madl <<a href="mailto:tobias.madl.dev@gmail.com">tobias.madl.dev@gmail.com</a>> wrote:<br>
> Replacing sounds good, but i have to change it in every single file, that<br>
> uses them, so there is the question if this work is really that usefull....<br>
> (but if you prefer to replace it i will do :)<br>
<br>
</span>If you change IdlePriority to a C++11 enum class, you have to adjust all<br>
the clients anyway. *If* you do that, then removing the now redundant<br>
prefix makes sense, I would say.<br>
<span class=""><br>
> I had the same idea with the static cast, but last time i wanted to use one<br>
> noel said no ^^ So is it ok, or not?<br>
<br>
</span>static_cast<> is not always safe (that's difference between<br>
dynamic_cast<> and static_cast<>), but static_casting an enum class to<br>
an int value is always safe, AFAIK. I would certainly choose that if it<br>
helps avoiding repeating yourself, which is the case here.<br>
<br>
Regards,<br>
<br>
Miklos<br>
</blockquote></div><br></div>