Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bring efel to c++17 standard #327

Merged
merged 8 commits into from
Oct 19, 2023
Merged

bring efel to c++17 standard #327

merged 8 commits into from
Oct 19, 2023

Conversation

anilbey
Copy link
Contributor

@anilbey anilbey commented Oct 18, 2023

Changes:

  • fixes linux, windows and mac wheel builds (previously failing)
  • replace deprecated bind2nd with lambda
  • add destructor to efel logger (to close the file once logger gets out of scope)

GErrorStr += "Could not find the decay.\n";
return -1;
}
i_start++;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the indentation here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I got confused with 4spaces vs 2 spaces indentation. Let me take it back

v.begin(), find_if(v.begin() + indices[i], v.begin() + indices[i + 1],
bind2nd(greater_equal<double>(), threshold)));
auto onset_index = std::distance(
v.begin(), std::find_if(v.begin() + indices[i], v.begin() + indices[i + 1],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use std:: here? You did not use it for the other changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in the next commit. The usage is now consistent within LibV1

std::bind2nd(std::less_equal<double>(), minimum_voltage)));
// get start index
const size_t decayStartIdx =
std::distance(voltage.begin(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are some more std::distance here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous commit was for LibV1, the next ones repeat it for LibV5 for std::distance and std::find_if.

Copy link
Collaborator

@ilkilic ilkilic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@anilbey anilbey merged commit 3ae9246 into master Oct 19, 2023
6 checks passed
@anilbey anilbey deleted the c++17 branch October 19, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants