D13095: Scren brightness follow a quatratic progression

Vlad Zagorodniy noreply at phabricator.kde.org
Mon May 28 21:48:31 UTC 2018


zzag added inline comments.

INLINE COMMENTS

> powerdevilbrightnesslogic.cpp:135
> +        return value * 100.0 / m_valueMax;
> +    } else {
> +        return valueToStep(value) * 100.0 / m_steps;

Coding style nitpick: don't use "else" after a return statement. Same down below.

Kdelibs/Frameworks coding style doesn't say anything about early returns so here are links to other coding styles

- https://releases.llvm.org/2.7/docs/CodingStandards.html#hl_else_after_return
- https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#General_C.2FC.2B.2B_Practices (the first item)
- https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md (see Code Formatting section)

- https://clang.llvm.org/extra/clang-tidy/checks/readability-else-after-return.html

REPOSITORY
  R122 Powerdevil

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

To: thsurrel, #plasma, broulik, ngraham
Cc: zzag, ngraham, romangg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180528/0fced666/attachment-0001.html>


More information about the Plasma-devel mailing list