-
Notifications
You must be signed in to change notification settings - Fork 284
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 dead code + Move samples #412
Conversation
Codecov Report
@@ Coverage Diff @@
## master #412 +/- ##
==========================================
+ Coverage 53.93% 54.06% +0.13%
==========================================
Files 173 172 -1
Lines 26657 26592 -65
==========================================
Hits 14378 14378
+ Misses 12279 12214 -65 Continue to review full report at Codecov.
|
samples/crwedit.cpp
Outdated
|
||
void remove(Exiv2::Internal::CiffHeader* pHead); | ||
void add(Exiv2::Internal::CiffHeader* pHead); | ||
void help(); | ||
void write(const std::string& filename, const Exiv2::Internal::CiffHeader* pHead); | ||
|
||
int main(int argc, char* const argv[]) | ||
try { | ||
int main(int argc, char* const argv[]) try { |
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.
[Suggestion] Wrap the try {} catch {}
block in braces.
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.
And maybe for the other files too.
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.
Sure, I will add it 👍
Concerning 4f3a02e: I am not sure whether these are really useless. At least @clanmills Do you know what these files do? |
For sure it was dead code, since we were not compiling those files. Unless @clanmills know something more about that file, and he thinks it is useful somehow, I would vote to test that part of the code when somebody revisits it. |
Good find. I don't know anything about this code. |
Codecov Report
@@ Coverage Diff @@
## master #412 +/- ##
==========================================
+ Coverage 53.93% 54.06% +0.13%
==========================================
Files 173 172 -1
Lines 26657 26592 -65
==========================================
Hits 14378 14378
+ Misses 12279 12214 -65 Continue to review full report at Codecov.
|
Looks like stuff that Andreas added ages ago for testing. Let's get rid of it. I'll approve this later, when I'm not on mobile. |
The utilities crwedit.cpp and crwparse.cpp are breaking the build on MinGW. For the moment, I've commented them off in samples/CMakeLists.txt There are two issues.
Analysis
This can be fixed with a simpler/revised src/timegm.h
I'm a little lost on this one. These entries are not in the library. I think we should remove crwedit.cpp from the code base.
|
The MinGW build doesn't appear to have any When I look for 'Internal' , I find 0 (none) on MinGW and 1911 entries on Mac. So the linker is correct,
The quick fix is to remove crwedit.cpp from the code base. |
For me it is fine to remove the app. I just moved to the samples in case it could be useful, but actually we were not compiling it before. I will create a PR to remove it. |
Thanks @piponazo Removing it (and crwparse.cpp) is probably the right thing. And remove it from samples/CMakeLists.txt We could create a directory contrib/obsolete and move it there. Might be useful for dealing with CR3. We don't built it of course - just add contrib/obsolete/ReadMe.txt to say something about the code. |
I do not like the idea of leaving code around "just-in-case ...". But we could create such text file mentioning obsolete pieces of code that were deleted and could be useful in the future for addressing some refactoring. In such document we could point to the PR deleting the code, so that a future contributor could see why the code was deleted and be able to recover the code from the git history. |
Let's just remove it. When the time comes to deal with CR3 (and the like), we'll probably write new utilities anyway. I had the SVN 'team' repos for this purpose. There's no reason to retain obsolete code in the public code-base. |
In this PR I did the following changes: