-
Notifications
You must be signed in to change notification settings - Fork 3
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
Place components in namespaces #17
base: master
Are you sure you want to change the base?
Conversation
Another question, I noticed you also have a |
That's absolutely fine. Looking at the PR, I feel like the other files would also benefit from this... I am normally prefixing It would probably be the more natural and less intrusive choice to move everything in
The CI builds with some major macro definitions being toggled, for example the
If it doesn't bother your project, it might be better to leave it alone. Else, I would split the The reason for this being that |
Was thinking about that yesterday as well! I think that would simplify things greatly for most files.
It doesn't bother me, and that explanation makes sense to me. I'll leave the file structure alone in this PR, but I want to change directory structure/include-paths in a follow up to prevent file name conflicts. Will get to this early next week! :) |
fa4ad7e
to
ec493b1
Compare
@mxmlnkn I cleaned up the PR to have core included in rapidgzip namespace. Only a few spots needed additional prefixing now. One thing I did have to change was the naming of the BitReader alias, which would conflict being in both namespaces. So for that change I edited it to: |
Alternatively, would using |
Hm, I see the need to have a different name, but I think that the size of the internal buffer should not be encoded in the name as it may change for performance reasons and is not even fully true because it also has a larger kilo-byte-sized byte buffer. The other template argument is much more meaningful, at least to me, i.e., As for the commits. Personally, I would implement this in two commits:
If this is too much style feedback, I can also merge it and do the touch-ups. |
src/core/Prefetcher.hpp
Outdated
@@ -327,4 +328,5 @@ class FetchMultiStream : | |||
private: | |||
const size_t m_memorySizePerStream; | |||
}; | |||
} // FetchingStrategy | |||
} // namespace FetchingStrategy |
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.
The style enforced by uncrustify should be two spaces before end-of-line comments. But, it's fine, I can also change this after merging the next time I try to iron out the uncrustify config.
src/core/StreamedResults.hpp
Outdated
@@ -153,3 +154,4 @@ class StreamedResults | |||
Values m_results; | |||
std::atomic<bool> m_finalized = false; | |||
}; | |||
} // namespace rapidgzip |
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.
Missing newline at the end of the file. I can fix this later myself if you want. Also applies to some other files.
e4d693f
to
fd92808
Compare
Added it as
Should be fixed.. not sure what my IDE is up to 🤷
Added back
Added back and referenced
It turns out this cannot be easily done. Didn't dive too deeply into it, but it appears to be needed by some of common.hpp, and it seems like import order will matter if common is included before TestHelpers. I added it back to the top of testCLI just put into the namespace.
I'm fine either way. Want to get your thoughts on |
fd92808
to
0406aa5
Compare
0406aa5
to
ce9e396
Compare
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'm fine either way. Want to get your thoughts on
rapidgzip::gzip::BitReader
and if that is what you intended first before I go into rebasing. For right now I just squashed all my commits together.
Looks good 👍
From mxmlnkn/rapidgzip#48
edited
using namespace rapidgzip
to test and app files.