Bug 390087 - kcms/kfontinst/lib/Misc.cpp:294: strange if statement ?
Summary: kcms/kfontinst/lib/Misc.cpp:294: strange if statement ?
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fontinst (show other bugs)
Version: 5.12.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-08 17:08 UTC by dcb314
Modified: 2021-01-03 18:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.21


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcb314 2018-02-08 17:08:57 UTC
plasma-desktop-5.12.0/kcms/kfontinst/lib/Misc.cpp:294]: (style) Same expression on both sides of '||'.

Source code is

     return "font/otf"==mime || "font/ttf"==mime ||
            "application/x-font-type1"==mime ||
            "application/x-font-ttf"==mime || "application/x-font-otf"==mime ||
            "application/x-font-type1"==mime;

x-font-type1 gets mentioned twice. Suggest code rework.
Comment 1 twinshadows404 2021-01-02 07:59:03 UTC
*** Bug 429020 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2021-01-03 18:47:36 UTC
Git commit 40abecde7d7ce0939a41e54cd264891319d2cb75 by Nate Graham.
Committed on 03/01/2021 at 18:45.
Pushed by ngraham into branch 'master'.

[kcms/kfontinst] Remove a redundant condition in an if statement
FIXED-IN: 5.21

M  +0    -1    kcms/kfontinst/lib/Misc.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/40abecde7d7ce0939a41e54cd264891319d2cb75