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

Consolidate WindowsWmicFinder #25

Merged
merged 2 commits into from
Dec 4, 2022
Merged

Consolidate WindowsWmicFinder #25

merged 2 commits into from
Dec 4, 2022

Conversation

theofidry
Copy link
Owner

  • Move the popen function check instead of relying on the CpuCoreCounter's proc_open check.
  • Return null directly if is not on Windows (hence the command will not work); this was previously done in CpuCoreCounter but it more belongs to the finder as it's really a micro-optimization since the constant defined check is faster than doing popen
  • Refactor WindowsWmicFinder::find() for better readability
  • Handle potential fgets false value returned

@theofidry theofidry merged commit f1ea48c into main Dec 4, 2022
@theofidry theofidry deleted the feature/consolidate-code branch December 4, 2022 17:33
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.

1 participant