-
Notifications
You must be signed in to change notification settings - Fork 449
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
Remove unused functions #5850
Remove unused functions #5850
Conversation
Oops, I don't see how I missed that Start function, but it makes sense now. I'll fix that when I'm able to. |
Please do not remove the following line from MainDocument.h:
Since this line is disabled with Also, please use caution when removing declarations, because some functions are used only by builds for certain operations systems (Windows, MacOS, Linux, Android, etc.) Ideally both the header declaration and function definition will be guarded by something like |
Understood, apologies that I missed that the first time around.
It didn't find it that way, I just thought it was commented out for not being used, but I was too quick with the delete key for that one. This was an exception to how I was targeting unused functions. Again, apologies.
Yes, I did see some of those, and for the most part I left them alone because I didn't want to break something I didn't fully understand. For all other functions I did painstakingly search through the entire code to see if the function was used. If I didn't find it anywhere else, I removed it. There are some instances where a function was marked as not used, but something else was happening (different input variables, or preprocessor declarations for example), and I left those alone since it wasn't just removing a declaration. The only declaration I see right now I have removed is part of a preprocessor is here: Line 390 in be88490
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5850 +/- ##
============================================
+ Coverage 10.51% 10.78% +0.26%
Complexity 1068 1068
============================================
Files 280 280
Lines 36021 36448 +427
Branches 8441 8441
============================================
+ Hits 3789 3930 +141
- Misses 31843 32129 +286
Partials 389 389
|
Okay, take two. I think this is ready for review now. |
Ok, it was not easy. |
Thank you for reviewing, @AenBleidd. I'm sure it was harder than it seemed. |
Description of the Change
Browsing through the code, I have found several functions defined in header files that Visual Studio found did not have an associated function nor inline code. Since these functions do not exist, this PR removes them.
I have broken up the PR into three commits; each commit is for a subfolder (client, manager, and lib).
This PR does not clean up ALL unused functions. There were some functions that were empty constructors that I didn't feel comfortable removing. Another thing I discovered were some functions were noted by Visual Studio as not defined, but the function was written in one or more preprocessor definitions. With that said, I tried to carefully remove only functions that were obvious to me that weren't defined. Thank you in advance for reviewing!