Mailing List Archive

[MythTV/mythtv] 21fe7f: tidy: Change false to 0 in a couple of places.
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: 21fe7f74f2c87ccede06069dc121057d720a5dd0
https://github.com/MythTV/mythtv/commit/21fe7f74f2c87ccede06069dc121057d720a5dd0
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythtv/programs/mythbackend/servicesv2/v2capture.cpp
M mythtv/programs/mythfrontend/globalsettings.cpp

Log Message:
-----------
tidy: Change false to 0 in a couple of places.


Commit: 9ece6a9a71941de8bda6495016b689d1f5ca05c5
https://github.com/MythTV/mythtv/commit/9ece6a9a71941de8bda6495016b689d1f5ca05c5
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythtv/libs/libmyth/audio/eldutils.cpp
M mythtv/libs/libmythmpeg2/header.c

Log Message:
-----------
tidy: Convert a series of #define statements into an enum.

https://clang.llvm.org/extra/clang-tidy/checks/modernize/macro-to-enum.html


Commit: f4592a022b5026ae509b16a87f34a79201d79f13
https://github.com/MythTV/mythtv/commit/f4592a022b5026ae509b16a87f34a79201d79f13
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythtv/libs/libmyth/audio/pink.h
M mythtv/libs/libmythbase/http/mythwebsocket.cpp
M mythtv/libs/libmythfreemheg/ParseBinary.cpp
M mythtv/libs/libmythtv/captions/textsubtitleparser.cpp
M mythtv/libs/libmythtv/recorders/vbitext/vbi.cpp

Log Message:
-----------
tidy: Convert #defines to static constexpr.

The tidy macro-to-enum checker identified these macros as being
eligible to be converted to an enum, but they aren't related. A
better solution is to convert them to static constexpr. This means
that they are no longer blind text substitutions by the preprocessor,
but now have a type and are processed by the c++ compiler.


Commit: ebd4274637159171c311f1b3daaa3ceb01bb1352
https://github.com/MythTV/mythtv/commit/ebd4274637159171c311f1b3daaa3ceb01bb1352
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythplugins/mythmusic/mythmusic/musicbrainz.h

Log Message:
-----------
tidy: Fix inconsistent declaration name.


Commit: 2802f825014ed8d792e942269235914caa7afcd1
https://github.com/MythTV/mythtv/commit/2802f825014ed8d792e942269235914caa7afcd1
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythplugins/mytharchive/mytharchivehelper/mytharchivehelper.cpp
M mythplugins/mythmusic/mythmusic/musicbrainz.h
M mythtv/libs/libmythbase/logging.cpp
M mythtv/libs/libmythtv/mpeg/sctetables.cpp
M mythtv/libs/libmythtv/recorders/ExternalStreamHandler.cpp

Log Message:
-----------
tidy: Fix static function related warnings.

1) Convert two functions to be static.

2) Change a couple of references to static functions to access them
directly instead of through an instance variable.


Commit: ddac17ac4d87facc5cdd0253f7d0a57347c0fdeb
https://github.com/MythTV/mythtv/commit/ddac17ac4d87facc5cdd0253f7d0a57347c0fdeb
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythtv/libs/libmythui/mythuispinbox.h

Log Message:
-----------
tidy: Fix "void function should not have a specified return value" warning.

This looks like a potential copy/paste/edit error. This is a set
function that calls another set function. There is no return value,
so it shouldn't have a return statement.


Commit: ca6e88d4d9d43f012c4e4b3e3532ac88248e803a
https://github.com/MythTV/mythtv/commit/ca6e88d4d9d43f012c4e4b3e3532ac88248e803a
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythplugins/mythbrowser/mythbrowser/bookmarkmanager.h
M mythplugins/mythnews/mythnews/newssite.h
M mythtv/libs/libmyth/audio/audiooutputgraph.cpp
M mythtv/libs/libmythbase/http/mythhttpcommon.h
M mythtv/libs/libmythbase/http/mythhttpmetamethod.h
M mythtv/libs/libmythbase/http/mythhttpservice.h
M mythtv/libs/libmythbase/http/mythwebsockettypes.h
M mythtv/libs/libmythbase/mythsocket.h
M mythtv/libs/libmythfreesurround/el_processor.cpp
M mythtv/libs/libmythtv/channelscan/channelimporter.cpp
M mythtv/libs/libmythtv/mheg/mhi.h
M mythtv/libs/libmythtv/mheg/netstream.h
M mythtv/libs/libmythtv/mpeg/AVCParser.h
M mythtv/libs/libmythtv/mpeg/tspacket.h
M mythtv/libs/libmythtv/mythframe.h
M mythtv/libs/libmythtv/recorders/audioinputalsa.h
M mythtv/libs/libmythtv/recorders/audioinputoss.h
M mythtv/libs/libmythui/mythgesture.h
M mythtv/libs/libmythupnp/msocketdevice.h

Log Message:
-----------
tidy: Remove redundant inline specifiers. (1)

All of these changes are because "a member functions defined entirely
inside a class/struct/union definition is implicitly inlined."

These changes were made by the clang-tidy program.

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-inline-specifier.html


Commit: 2e9f529494fb180b6a0a897412e06bac5c586ac2
https://github.com/MythTV/mythtv/commit/2e9f529494fb180b6a0a897412e06bac5c586ac2
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythtv/libs/libmythbase/sizetliteral.h

Log Message:
-----------
tidy: Remove redundant inline specifiers. (2)

All of these changes are because "a member functions defined entirely
inside a class/struct/union definition is implicitly inlined."

These changes were pointed out by the clang-tidy program, but it
couldn't determine how to fix them. The changes were made by hand.

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-inline-specifier.html


Commit: 0c63e18f7cfa68cf67fcc7fbf7c33304eac3dc8a
https://github.com/MythTV/mythtv/commit/0c63e18f7cfa68cf67fcc7fbf7c33304eac3dc8a
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythplugins/mythzoneminder/mythzmserver/mythzmserver.cpp
M mythtv/programs/mythbackend/servicesv2/v2video.cpp

Log Message:
-----------
tidy: Replace "length() == 0" checks with "empty()".

The emptiness of a container should be checked using the empty()
method instead of the size()/length() method. It is not guaranteed
that size()/length() is a constant-time function, and it is generally
more efficient and also shows clearer intent to use empty().

These changes were made by the clang-tidy program.

https://clang.llvm.org/extra/clang-tidy/checks/readability/container-size-empty.html


Commit: d488a4109ad9c46e7a014cb0d900e704a4270c53
https://github.com/MythTV/mythtv/commit/d488a4109ad9c46e7a014cb0d900e704a4270c53
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythplugins/mytharchive/mytharchive/thumbfinder.h
M mythplugins/mythmusic/mythmusic/avfdecoder.h
M mythplugins/mythmusic/mythmusic/bumpscope.h
M mythplugins/mythmusic/mythmusic/smartplaylist.h
M mythplugins/mythmusic/mythmusic/visualize.h
M mythplugins/mythzoneminder/mythzmserver/zmserver.h
M mythtv/libs/libmyth/audio/eldutils.h
M mythtv/libs/libmythbase/http/mythhttpresponse.h
M mythtv/libs/libmythbase/http/mythhttpserver.h
M mythtv/libs/libmythbase/http/mythhttpthreadpool.h
M mythtv/libs/libmythbase/logging.h
M mythtv/libs/libmythbase/loggingserver.h
M mythtv/libs/libmythbase/mythcorecontext.h
M mythtv/libs/libmythbase/mythpower.h
M mythtv/libs/libmythbase/platforms/mythpowerdbus.h
M mythtv/libs/libmythtv/DVD/mythdvdplayer.h
M mythtv/libs/libmythtv/captions/cc708window.h
M mythtv/libs/libmythtv/decoders/avformatdecoder.h
M mythtv/libs/libmythtv/decoders/mythnvdeccontext.h
M mythtv/libs/libmythtv/mythdeinterlacer.h
M mythtv/libs/libmythtv/mythinteropgpu.h
M mythtv/libs/libmythtv/mythmediaoverlay.h
M mythtv/libs/libmythtv/mythplayercaptionsui.h
M mythtv/libs/libmythtv/mythplayerstate.h
M mythtv/libs/libmythtv/mythplayervideoui.h
M mythtv/libs/libmythtv/mythplayervisualiserui.h
M mythtv/libs/libmythtv/mythvideocolourspace.h
M mythtv/libs/libmythtv/mythvideoprofile.h
M mythtv/libs/libmythtv/opengl/mythvaapidrminterop.h
M mythtv/libs/libmythtv/opengl/mythvaapiinterop.h
M mythtv/libs/libmythtv/opengl/mythvdpauinterop.h
M mythtv/libs/libmythtv/osd.h
M mythtv/libs/libmythtv/overlays/mythnavigationoverlay.h
M mythtv/libs/libmythtv/recorders/dvbdev/dvbci.cpp
M mythtv/libs/libmythtv/recorders/v4lchannel.h
M mythtv/libs/libmythtv/tvplaybackstate.h
M mythtv/libs/libmythui/devices/mythinputdevicehandler.h
M mythtv/libs/libmythui/mythdisplay.h
M mythtv/libs/libmythui/mythdisplaymode.h
M mythtv/libs/libmythui/mythedid.h
M mythtv/libs/libmythui/opengl/mythopenglperf.h
M mythtv/libs/libmythui/platforms/mythdisplaydrm.h
M mythtv/libs/libmythui/platforms/mythdisplayx11.h
M mythtv/libs/libmythui/platforms/mythdrmdevice.h
M mythtv/libs/libmythui/platforms/mythxdisplay.h
M mythtv/programs/mythcommflag/SceneChangeDetector.h
M mythtv/programs/mythtranscode/mpeg2fix.h

Log Message:
-----------
tidy: Remove redundant member initializations. (1)

These "member initializations are unnecessary because the same default
constructor would be called if they were not present."

These changes were made by the clang-tidy program.

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html


Commit: 3888516c1b2b60357ec1b81fa1cae78219984d70
https://github.com/MythTV/mythtv/commit/3888516c1b2b60357ec1b81fa1cae78219984d70
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythtv/libs/libmythbase/http/mythhttpservice.h

Log Message:
-----------
tidy: Remove redundant member initializations. (2)

These "member initializations are unnecessary because the same default
constructor would be called if they were not present."

This change was pointed out by the clang-tidy program, but it couldn't
determine how to fix it. This change was made by hand.

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html


Commit: 1e9dd10955f2e144b718fa0b0ad2ebc24a559cd3
https://github.com/MythTV/mythtv/commit/1e9dd10955f2e144b718fa0b0ad2ebc24a559cd3
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythtv/libs/libmythtv/videosource.cpp

Log Message:
-----------
tidy: Fix incorrect usages of std::enable_if.

This tidy check points out incorrect usages of std::enable_if that
don’t name the nested type type. Fix the code to match the examples
from web page describing this check.

https://clang.llvm.org/extra/clang-tidy/checks/bugprone/incorrect-enable-if.html


Commit: 2e3b74fec490e5f950de6cf69f785c68bd71f354
https://github.com/MythTV/mythtv/commit/2e3b74fec490e5f950de6cf69f785c68bd71f354
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythplugins/mythmusic/mythmusic/musicbrainz.cpp

Log Message:
-----------
tidy: Fix performance warning about "no automatic move" available.

Removing the const declaration on a variable allows the compiler to
return it with a move instead of a copy.

https://clang.llvm.org/extra/clang-tidy/checks/performance/no-automatic-move.html


Commit: af3a05a7fce46996483f35f870895aff9a312e67
https://github.com/MythTV/mythtv/commit/af3a05a7fce46996483f35f870895aff9a312e67
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M mythtv/libs/libmythmetadata/videometadata.h
M mythtv/libs/libmythtv/mpeg/H2645Parser.h
M mythtv/libs/libmythtv/recorders/ExternalStreamHandler.h
M mythtv/programs/mythexternrecorder/MythExternControl.h
M mythtv/programs/mythfrontend/playbackbox.h
M mythtv/programs/mythtranscode/cutter.h

Log Message:
-----------
tidy: Convert some enums into static constexpr.

These are a couple of enums that clang-tidy indicated should be
updated to use a smaller data type. There aren't enums, they are
independent constants and the more appropriate change is to use a
'static constexpr' for these values.


Commit: 704b192a16057d21f38618a842f0ebe6ec81624a
https://github.com/MythTV/mythtv/commit/704b192a16057d21f38618a842f0ebe6ec81624a
Author: David Hampton <mythtv@love2code.net>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Changed paths:
M .clang-tidy

Log Message:
-----------
tidy: Don't run the EnumCastOutOfRange checker.

MythTV uses enums to define sets of bitflags, and then adds flags
together. This check complains about any value that isn't explicitly
part of the enum definition, meaning that it complains about any
combination of bitflags. Disable the check until C++ has a formal
data type for defining a set of bitflags.


Compare: https://github.com/MythTV/mythtv/compare/89f045854474...704b192a1605

To unsubscribe from these emails, change your notification settings at https://github.com/MythTV/mythtv/settings/notifications
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-commits