-
Notifications
You must be signed in to change notification settings - Fork 40
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 functionality from File.h to fix undefined behaviour #1225
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1225 +/- ##
==========================================
+ Coverage 84.30% 84.31% +0.01%
==========================================
Files 304 304
Lines 29091 29057 -34
Branches 3440 3437 -3
==========================================
- Hits 24524 24500 -24
+ Misses 3163 3157 -6
+ Partials 1404 1400 -4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two very minor suggestions.
|
The function
ad_utiliyt::File::readFile
was was subject to undefined behaviour if the buffer passed to the function does not contain a null terminator. This function is now completely removed and its only usage is replaced bystd::ifstream
.Also some parts of the class
ad_utility::File
are cleaned up by removing unused functionality and unused includes.