Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Jul 13, 2024
1 parent 090bd1a commit 5c8457c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions source/module_io/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ class Input
bool check_input = false;

std::time_t start_time;
std::time_t get_start_time(void) const
std::time_t get_start_time() const
{
return start_time;
}
Expand Down Expand Up @@ -466,11 +466,11 @@ class Input

bool Read(const std::string& fn);

void Default(void);
void Default();

void Default_2(void); // jiyy add 2019-08-04
void Default_2(); // jiyy add 2019-08-04

void Check(void);
void Check();

#ifdef __MPI
void Bcast(void);
Expand Down Expand Up @@ -530,12 +530,13 @@ class Input
template <typename T>
typename std::enable_if<std::is_same<T, int>::value, T>::type cast_string(const std::string& str)
{
if (str == "true" || str == "1")
if (str == "true" || str == "1") {
return 1;
else if (str == "false" || str == "0")
} else if (str == "false" || str == "0") {
return 0;
else
} else {
return std::stoi(str);
}
}
template <typename T>
typename std::enable_if<std::is_same<T, bool>::value, T>::type cast_string(const std::string& str)
Expand Down

0 comments on commit 5c8457c

Please sign in to comment.