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

Refactoring TimeType.compare/__le__ #95

Merged
merged 3 commits into from
Jul 20, 2022
Merged

Refactoring TimeType.compare/__le__ #95

merged 3 commits into from
Jul 20, 2022

Conversation

ThibFrgsGmz
Copy link
Contributor

Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s) void
Has Unit Tests (y/n) n
Builds Without Errors (y/n) Let CI run
Unit Tests Pass (y/n) Let CI run
Documentation Included (y/n) n

Change Description

The purpose of this PR is to:

  1. replace oneif statement with if expression in TimeType.compare
  2. remove unnecessary lambda function in CMakeHandler.purge
  3. remove unnecessary else statement used after return in TimeType.__le__.

Rationale

  1. Code readability
  2. A lambda that calls a function without modifying any of its parameters is unnecessary. It is preferred to use the function cache.get directly as the lambda function calls the same function without any modifications.
  3. In the case of an else block after return, the statements can be shifted out of else to improve code readability.

Testing/Review Recommendations

void

Future Work

void

A lambda that calls a function without modifying any of its parameters is unnecessary.
In the case of an else block after return, the statements can be shifted out of else.
@LeStarch LeStarch merged commit abb903d into nasa:devel Jul 20, 2022
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.

None yet

2 participants