Having a function with a confusing comment, to iterate over the enum,
is mostly confusing. Make it boring by just moving the cast to the one
place that uses it.
Details
Details
- Reviewers
romangg zzag - Group Reviewers
KWin - Commits
- R108:969403b35fe5: Make iterating over Layer enum simple
Diff Detail
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
to iterate over the enum, is mostly confusing
I actually find it a bit cool because we're iterating through layers, but yeah this part can be simpler. :-)
layers.cpp | ||
---|---|---|
534 | You don't need this static_cast. |
Comment Actions
Yes, I was amused as well, but to understand what is going on I had to read code in two places instead of one.
layers.cpp | ||
---|---|---|
534 | Nice, of course :) |