Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
clp-core: Refactor the BufferedFileReader to wrap around a ReaderInterface. #523
base: main
Are you sure you want to change the base?
clp-core: Refactor the BufferedFileReader to wrap around a ReaderInterface. #523
Changes from 63 commits
edbcc6d
21b4471
3a3c9ba
2c40e29
d503436
1ff5ea8
8a7ddc7
70325a9
99d45a6
b086953
746834f
d2a6836
7d347c1
63f0cfd
4a0a323
7192022
f6b6757
712d10b
80532ea
d30030a
4dabc96
a8d0747
ff0b9d8
b3f2795
4d0d80b
70c8342
83ee77e
9601fa8
59db88b
450632a
c6c8c9b
d5db2a6
39c9bb3
8909eab
c5cb603
cfcd0f7
948b315
ee41996
1b53cf7
d9b4de4
707817a
2a6248c
aff7a2e
f807eea
435e12a
1cd11b5
0c99da6
4acf9b5
d3e54c4
fd4eb36
5c301d7
ce7376b
1bbf2a4
1260043
aaa8c64
c147b41
02b0d10
810a77b
654eb35
c176c67
c2b6333
e4bbd30
7fc448a
4e5d3ff
676dc3c
dfb1211
38076be
a4eb75f
17e8cdb
8cc9e89
74f57bc
3d843ec
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
🛠️ Refactor suggestion
Remove unnecessary forward declaration of
read_into_buffer
to simplify codeSince the implementation of
read_into_buffer
follows immediately and there are no calls to it before its definition, the forward declaration within the anonymous namespace is unnecessary.You can safely remove the forward declaration at lines 32–37.
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.
@kirkrodrigues I believe our coding standard is to keep the forward declaration?
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.
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.
🛠️ Refactor suggestion
Consider simplifying error handling logic
The nested conditions and error handling could be made more readable by extracting the checkpoint-related logic into a separate method.
Consider refactoring like this:
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 don't think this applies to the original code snippet.
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.
@haiqi96, understood. I appreciate your feedback.
(つ﹏⊂)
✏️ Learnings added