You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In profile.cpp, calculate_deco_information() is a rather long and complex function. Breaking out the logic into helper functions would improve readability and maintainability.
Operating system:
Not applicable. Found by code review.
Subsurface version:
Not applicable. Current version of profile.cpp.
Steps to reproduce:
Not applicable. Function is at line 839 of profile.cpp.
Current behavior:
This function has several blocks of logic that initialize state, iterates and updates plot entries, and updates final deco information. All of this takes place in a mass of nested loops and conditional checks.
Expected behavior:
The logic can be broken out into helper functions that are called by the original function so that it is easier to follow and the code can be more easily maintained and tested.
Additional information:
This issue is based on a review for code smells.
This is officially my first issue on any repository, so I hope this is remotely helpful to the project. I'm currently taking an open source class at Oregon State (I see one of my classmates also just opened an issue) and am a recreational diver who has had Subsurface recommended to me multiple times, so this project checked all the boxes for this assignment.
If this issue is not worthwhile of being incorporated, I'm more than happy to take on an existing issue for my next assignment which is creating a pull request.
Mentions:
The text was updated successfully, but these errors were encountered:
Describe the issue:
Issue long description:
In profile.cpp, calculate_deco_information() is a rather long and complex function. Breaking out the logic into helper functions would improve readability and maintainability.
Operating system:
Not applicable. Found by code review.
Subsurface version:
Not applicable. Current version of profile.cpp.
Steps to reproduce:
Not applicable. Function is at line 839 of profile.cpp.
Current behavior:
This function has several blocks of logic that initialize state, iterates and updates plot entries, and updates final deco information. All of this takes place in a mass of nested loops and conditional checks.
Expected behavior:
The logic can be broken out into helper functions that are called by the original function so that it is easier to follow and the code can be more easily maintained and tested.
Additional information:
This issue is based on a review for code smells.
This is officially my first issue on any repository, so I hope this is remotely helpful to the project. I'm currently taking an open source class at Oregon State (I see one of my classmates also just opened an issue) and am a recreational diver who has had Subsurface recommended to me multiple times, so this project checked all the boxes for this assignment.
If this issue is not worthwhile of being incorporated, I'm more than happy to take on an existing issue for my next assignment which is creating a pull request.
Mentions:
The text was updated successfully, but these errors were encountered: