Skip to content

Commit

Permalink
[pre-commit.ci] Automatic python and c++ formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Sep 30, 2024
1 parent 8097b86 commit d9fb647
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions core/opengate_core/opengate_lib/indicators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ static inline size_t terminal_width() { return terminal_size().second; }
namespace indicators {

static inline std::pair<size_t, size_t> terminal_size() {
struct winsize size {};
struct winsize size{};
ioctl(STDOUT_FILENO, TIOCGWINSZ, &size);
return {static_cast<size_t>(size.ws_row), static_cast<size_t>(size.ws_col)};
}
Expand Down Expand Up @@ -1023,10 +1023,9 @@ struct option_idx<Id, std::tuple<>, counter> {
};

template <ProgressBarOption Id, typename Settings>
auto get_value(Settings &&settings)
-> decltype((
std::get<option_idx<Id, typename std::decay<Settings>::type>::value>(
std::declval<Settings &&>()))) {
auto get_value(Settings &&settings) -> decltype((
std::get<option_idx<Id, typename std::decay<Settings>::type>::value>(
std::declval<Settings &&>()))) {
return std::get<option_idx<Id, typename std::decay<Settings>::type>::value>(
std::forward<Settings>(settings));
}
Expand Down Expand Up @@ -1972,9 +1971,8 @@ class ProgressBar {
}

template <details::ProgressBarOption id>
auto get_value() const
-> decltype((
details::get_value<id>(std::declval<const Settings &>()).value)) {
auto get_value() const -> decltype((
details::get_value<id>(std::declval<const Settings &>()).value)) {
return details::get_value<id>(settings_).value;
}

Expand Down Expand Up @@ -2309,9 +2307,8 @@ class BlockProgressBar {
}

template <details::ProgressBarOption id>
auto get_value() const
-> decltype((
details::get_value<id>(std::declval<const Settings &>()).value)) {
auto get_value() const -> decltype((
details::get_value<id>(std::declval<const Settings &>()).value)) {
return details::get_value<id>(settings_).value;
}

Expand Down Expand Up @@ -2638,9 +2635,8 @@ class IndeterminateProgressBar {
}

template <details::ProgressBarOption id>
auto get_value() const
-> decltype((
details::get_value<id>(std::declval<const Settings &>()).value)) {
auto get_value() const -> decltype((
details::get_value<id>(std::declval<const Settings &>()).value)) {
return details::get_value<id>(settings_).value;
}

Expand Down Expand Up @@ -2900,9 +2896,8 @@ template <typename Indicator> class DynamicProgress {
}

template <details::ProgressBarOption id>
auto get_value() const
-> decltype((
details::get_value<id>(std::declval<const Settings &>()).value)) {
auto get_value() const -> decltype((
details::get_value<id>(std::declval<const Settings &>()).value)) {
return details::get_value<id>(settings_).value;
}

Expand Down Expand Up @@ -3115,9 +3110,8 @@ class ProgressSpinner {
}

template <details::ProgressBarOption id>
auto get_value() const
-> decltype((
details::get_value<id>(std::declval<const Settings &>()).value)) {
auto get_value() const -> decltype((
details::get_value<id>(std::declval<const Settings &>()).value)) {
return details::get_value<id>(settings_).value;
}

Expand Down

0 comments on commit d9fb647

Please sign in to comment.