D10832: Replace all enum to enum class

Elvis Angelaccio noreply at phabricator.kde.org
Sun Feb 25 14:10:49 GMT 2018


elvisangelaccio added subscribers: rkflx, markg, elvisangelaccio.
elvisangelaccio added a comment.


  Thanks for the patch.
  
  I agree we should use `enum class` for new code, I'm not sure it's worth porting to old enums though. 
  The problem is that this diff is huge and it will make `git blame` harder to use, for little gain. 
  @markg  @rkflx toughts?
  
  That said, if we really want to do it, please get rid of those static_casts where possible, they will only reduce the readability of the code.

INLINE COMMENTS

> dolphincontextmenu.cpp:72
>      m_selectedItemsProperties(nullptr),
> -    m_context(NoContext),
> +    m_context(static_cast<int>(ContextType::NoContext)),
>      m_copyToMenu(parent),

If we change the type of `m_context`, we don't need the `static_cast`.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D10832

To: rominf, #dolphin
Cc: elvisangelaccio, markg, rkflx, #dolphin, spoorun, navarromorales, isidorov, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180225/eca0507e/attachment.htm>


More information about the kfm-devel mailing list