Skip to content

Conversation

@PeizeLin
Copy link
Collaborator

@PeizeLin PeizeLin commented Sep 15, 2024

Move some codes in ModuleIO::read_cube() and ModuleIO::write_cube() to new functions ModuleIO::read_cube_core_match(), ModuleIO::read_cube_core_mismatch() and ModuleIO::write_cube_core().
Refactor these functions.

For users, there is no change in input or output.

namespace ModuleIO
{
bool read_cube(
extern bool read_cube(
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you explain why you add extern here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Writing extern explicitly will ask the compiler to report an error if the functions in .h and .cpp are different.

@PeizeLin PeizeLin changed the title Refactor ModuleIO::read/write_cube() Refactor ModuleIO::read/write_cube() Sep 20, 2024
@PeizeLin PeizeLin closed this by deleting the head repository Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants