[mythtv-commits] [MythTV/mythtv] 963e33: tidy: Replace some if/then clauses with calls to s...

David Hampton noreply at github.com
Fri Oct 4 16:08:21 UTC 2024


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: 963e3366f3cc526f1a669c20773414edb4192364
      https://github.com/MythTV/mythtv/commit/963e3366f3cc526f1a669c20773414edb4192364
  Author: David Hampton <mythtv at love2code.net>
  Date:   2024-10-03 (Thu, 03 Oct 2024)

  Changed paths:
    M mythtv/libs/libmyth/audio/audiooutputbase.cpp
    M mythtv/libs/libmyth/audio/audiooutputnull.cpp
    M mythtv/libs/libmyth/audio/audiooutputoss.cpp
    M mythtv/libs/libmyth/audio/audiooutputsettings.cpp
    M mythtv/libs/libmyth/audio/eldutils.cpp
    M mythtv/libs/libmyth/audio/pink.cpp
    M mythtv/libs/libmyth/mythcontext.cpp
    M mythtv/libs/libmythbase/http/mythwebsocket.cpp
    M mythtv/libs/libmythbase/programinfo.cpp
    M mythtv/libs/libmythfreemheg/BaseClasses.cpp
    M mythtv/libs/libmythfreemheg/Bitmap.cpp
    M mythtv/libs/libmythfreemheg/Groups.cpp
    M mythtv/libs/libmythfreemheg/Programs.cpp
    M mythtv/libs/libmythfreemheg/Text.cpp
    M mythtv/libs/libmythfreemheg/TokenGroup.cpp
    M mythtv/libs/libmythfreesurround/freesurround.cpp
    M mythtv/libs/libmythmetadata/videometadata.cpp
    M mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp
    M mythtv/libs/libmythtv/DVD/mythdvdbuffer.cpp
    M mythtv/libs/libmythtv/DVD/mythdvdplayer.cpp
    M mythtv/libs/libmythtv/DVD/mythdvdstream.cpp
    M mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp
    M mythtv/libs/libmythtv/bitreader.h
    M mythtv/libs/libmythtv/bytereader.cpp
    M mythtv/libs/libmythtv/captions/cc608reader.cpp
    M mythtv/libs/libmythtv/captions/subtitlescreen.cpp
    M mythtv/libs/libmythtv/captions/teletextreader.cpp
    M mythtv/libs/libmythtv/captions/teletextscreen.cpp
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
    M mythtv/libs/libmythtv/deletemap.cpp
    M mythtv/libs/libmythtv/io/mythmediabuffer.cpp
    M mythtv/libs/libmythtv/livetvchain.cpp
    M mythtv/libs/libmythtv/mheg/mhi.cpp
    M mythtv/libs/libmythtv/mheg/netstream.cpp
    M mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp
    M mythtv/libs/libmythtv/mythplayer.cpp
    M mythtv/libs/libmythtv/recorders/NuppelVideoRecorder.cpp
    M mythtv/libs/libmythtv/recorders/RTjpegN.cpp
    M mythtv/libs/libmythtv/recorders/dvbchannel.cpp
    M mythtv/libs/libmythtv/recorders/vbitext/vbi.cpp
    M mythtv/libs/libmythtv/recordingprofile.cpp
    M mythtv/libs/libmythtv/tv_play.cpp
    M mythtv/libs/libmythtv/v4l2util.cpp
    M mythtv/libs/libmythtv/visualisations/goom/filters.cpp
    M mythtv/libs/libmythtv/visualisations/goom/goom_core.cpp
    M mythtv/libs/libmythtv/visualisations/goom/lines.cpp
    M mythtv/libs/libmythtv/visualisations/goom/tentacle3d.cpp
    M mythtv/libs/libmythtv/visualisations/goom/zoom_filter_mmx.cpp
    M mythtv/libs/libmythtv/visualisations/videovisual.cpp
    M mythtv/libs/libmythtv/visualisations/videovisualdefs.h
    M mythtv/libs/libmythtv/visualisations/videovisualspectrum.cpp
    M mythtv/libs/libmythui/mythpainter.cpp
    M mythtv/libs/libmythui/mythuibuttonlist.cpp
    M mythtv/libs/libmythui/mythuiprogressbar.cpp
    M mythtv/libs/libmythui/mythuiscrollbar.cpp
    M mythtv/libs/libmythui/mythuitext.cpp
    M mythtv/libs/libmythui/mythuitype.cpp
    M mythtv/libs/libmythui/mythuiwebbrowser.cpp
    M mythtv/libs/libmythui/opengl/mythrenderopengl.cpp
    M mythtv/libs/libmythui/platforms/drm/mythdrmproperty.cpp

  Log Message:
  -----------
  tidy: Replace some if/then clauses with calls to std::min/max. (libs)

Replace some conditional if/then statements with the equivalent call
to std::max.  This can help clarify reading the code.  If a variable
is tested for both upper and lower bounds, replace both tests with a
call to std::clamp.

std::min and std::max changes made by clang-tidy.  Conversions of
min/max pairs to std::clamp by hand.  The single static_cast is to
support compiling on both qt5 and qt6.

https://clang.llvm.org/extra/clang-tidy/checks/readability/use-std-min-max.html


  Commit: 2875774026259a7d6a543dec699300e0ebb854ff
      https://github.com/MythTV/mythtv/commit/2875774026259a7d6a543dec699300e0ebb854ff
  Author: David Hampton <mythtv at love2code.net>
  Date:   2024-10-03 (Thu, 03 Oct 2024)

  Changed paths:
    M mythtv/programs/mythbackend/backendhousekeeper.cpp
    M mythtv/programs/mythbackend/services/guide.cpp
    M mythtv/programs/mythbackend/servicesv2/v2channel.cpp
    M mythtv/programs/mythbackend/servicesv2/v2guide.cpp
    M mythtv/programs/mythcommflag/BlankFrameDetector.cpp
    M mythtv/programs/mythcommflag/BorderDetector.cpp
    M mythtv/programs/mythcommflag/ClassicCommDetector.cpp
    M mythtv/programs/mythcommflag/ClassicLogoDetector.cpp
    M mythtv/programs/mythcommflag/Histogram.cpp
    M mythtv/programs/mythcommflag/PrePostRollFlagger.cpp
    M mythtv/programs/mythcommflag/TemplateFinder.cpp
    M mythtv/programs/mythcommflag/TemplateMatcher.cpp
    M mythtv/programs/mythfilerecorder/mythfilerecorder.cpp
    M mythtv/programs/mythfilldatabase/filldata.cpp
    M mythtv/programs/mythfrontend/gallerythumbview.cpp
    M mythtv/programs/mythfrontend/guidegrid.cpp
    M mythtv/programs/mythfrontend/playbackbox.cpp
    M mythtv/programs/mythfrontend/setupwizard_audio.cpp
    M mythtv/programs/mythfrontend/viewscheduled.cpp
    M mythtv/programs/mythlcdserver/lcdprocclient.cpp
    M mythtv/programs/mythtranscode/external/replex/multiplex.cpp
    M mythtv/programs/mythtranscode/external/replex/ts.cpp

  Log Message:
  -----------
  tidy: Replace some if/then clauses with calls to std::min/max. (programs)

Replace some conditional if/then statements with the equivalent call
to std::max.  This can help clarify reading the code.  If a variable
is tested for both upper and lower bounds, replace both tests with a
call to std::clamp.

std::min and std::max changes made by clang-tidy.  Conversions of
min/max pairs to std::clamp by hand.  The single static_cast is to
support compiling on both qt5 and qt6.

https://clang.llvm.org/extra/clang-tidy/checks/readability/use-std-min-max.html


  Commit: 35c6d7b35ddf7de8a23d0be5492277fbc137b141
      https://github.com/MythTV/mythtv/commit/35c6d7b35ddf7de8a23d0be5492277fbc137b141
  Author: David Hampton <mythtv at love2code.net>
  Date:   2024-10-03 (Thu, 03 Oct 2024)

  Changed paths:
    M mythplugins/mytharchive/mytharchive/thumbfinder.cpp
    M mythplugins/mythbrowser/mythbrowser/bookmarkmanager.cpp
    M mythplugins/mythmusic/mythmusic/bumpscope.cpp
    M mythplugins/mythmusic/mythmusic/mainvisual.cpp
    M mythplugins/mythmusic/mythmusic/mythgoom.cpp
    M mythplugins/mythmusic/mythmusic/synaesthesia.cpp
    M mythplugins/mythmusic/mythmusic/visualize.cpp
    M mythplugins/mythzoneminder/mythzmserver/mythzmserver.cpp
    M mythplugins/mythzoneminder/mythzoneminder/zmevents.cpp
    M mythplugins/mythzoneminder/mythzoneminder/zmplayer.cpp

  Log Message:
  -----------
  tidy: Replace some if/then clauses with calls to std::min/max. (plugins)

Replace some conditional if/then statements with the equivalent call
to std::max.  This can help clarify reading the code.  If a variable
is tested for both upper and lower bounds, replace both tests with a
call to std::clamp.

std::min and std::max changes made by clang-tidy.  Conversions of
min/max pairs to std::clamp by hand.

https://clang.llvm.org/extra/clang-tidy/checks/readability/use-std-min-max.html


Compare: https://github.com/MythTV/mythtv/compare/b96c272e7aa2...35c6d7b35ddf

To unsubscribe from these emails, change your notification settings at https://github.com/MythTV/mythtv/settings/notifications


More information about the mythtv-commits mailing list