Skip to content

Commit

Permalink
tidy: Fix incorrect usages of std::enable_if.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
linuxdude42 committed Mar 25, 2024
1 parent 3888516 commit 1e9dd10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/videosource.cpp
Expand Up @@ -401,7 +401,7 @@ class CaptureCardSpinBoxSetting : public MythUISpinBoxSetting
void setValueMs (std::chrono::milliseconds newValue)
{ setValue(newValue.count()); }
// Handle non-integer seconds
template<typename T, typename = typename std::enable_if<!std::is_integral<T>()>>
template<typename T, typename = typename std::enable_if<!std::is_integral<T>()>::type>
void setValueMs (std::chrono::duration<T> newSecs)
{ setValueMs(duration_cast<std::chrono::milliseconds>(newSecs)); }
};
Expand Down

0 comments on commit 1e9dd10

Please sign in to comment.