Skip to content

Conversation

@piponazo
Copy link
Collaborator

In this PR I am proposing to move the implementation of Params's methods to its own .cpp file.

I started these changes just with the idea of implementing the existing Singleton in Params in the modern c++ way (see first commit). Then I realised that most of the file exiv2.cpp was the implementation of that Params class and I think it would be better to have it on its own file. Thanks to this change, now the exiv2.cpp file only has 90 LoC.

I recommend to review the PR commit by commit since I also took the opportunity to clang-format the exiv2app.* files.

@piponazo piponazo added the refactoring Cleanup / Simplify code -> more readable / robust label Apr 21, 2019
@piponazo piponazo requested review from D4N, clanmills and tbeu April 21, 2019 07:15
@piponazo piponazo self-assigned this Apr 21, 2019
@piponazo
Copy link
Collaborator Author

I was also thinking about renaming the files exiv2app.* to Params.*, to match the class name. What do you think about that?

@piponazo piponazo force-pushed the MoveParamsImplementationToNewFile branch from f1b2868 to 94f30dd Compare April 21, 2019 13:41
@codecov
Copy link

codecov bot commented Apr 21, 2019

Codecov Report

Merging #784 into master will increase coverage by 0.14%.
The diff coverage is 73.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #784      +/-   ##
==========================================
+ Coverage   70.57%   70.72%   +0.14%     
==========================================
  Files         144      145       +1     
  Lines       19214    19208       -6     
==========================================
+ Hits        13560    13584      +24     
+ Misses       5654     5624      -30
Impacted Files Coverage Δ
src/actions.cpp 73.44% <ø> (+0.05%) ⬆️
src/actions.hpp 100% <ø> (ø) ⬆️
src/params.hpp 100% <100%> (ø)
src/exiv2.cpp 100% <100%> (+29.28%) ⬆️
src/params.cpp 73.03% <73.03%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4598ea9...1894d9b. Read the comment docs.

D4N
D4N previously approved these changes Apr 22, 2019
Copy link
Member

@D4N D4N left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great cleanup, thank you!

@D4N
Copy link
Member

D4N commented Apr 23, 2019

I was also thinking about renaming the files exiv2app.* to Params.*, to match the class name. What do you think about that?

Sorry, missed this comment: no objections from my side, I'm all in for more clarity.

@mergify mergify bot dismissed D4N’s stale review April 23, 2019 16:42

Pull request has been modified.

@piponazo piponazo force-pushed the MoveParamsImplementationToNewFile branch from b50ff89 to 1894d9b Compare April 23, 2019 16:52
@piponazo piponazo mentioned this pull request Apr 23, 2019
Copy link
Member

@D4N D4N left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@piponazo piponazo merged commit 55dfdb9 into master Apr 23, 2019
@mergify mergify bot deleted the MoveParamsImplementationToNewFile branch April 23, 2019 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Cleanup / Simplify code -> more readable / robust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants