Skip to content
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

Rename Comment to DocComment in the Slice Compilers #3170

Merged

Conversation

InsertCreativityHere
Copy link
Member

This PR implements #3141 by changing all types and 'public' functions that talk about 'Comment' to talk about 'DocComment's instead.

There were plenty of local variables named comment. I left these alone. It's already very clear from the context that these are doc-comments.

@@ -321,7 +321,7 @@ Slice::filterMcppWarnings(const string& message)
}

void
Slice::printGeneratedHeader(IceInternal::Output& out, const string& path, const string& comment)
Copy link
Member Author

Choose a reason for hiding this comment

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

This variable was named commentStyle in the header file:

printGeneratedHeader(IceInternal::Output& out, const std::string& path, const std::string& commentStyle = "//");

I fixed this to use the same name. Header and source files should use the same name IMO.

Comment on lines -119 to -124
bool keepComments = true;

for (const auto& file : files)
{
Slice::PreprocessorPtr icecpp = Slice::Preprocessor::create("icecpp", file, cppArgs);
FILE* cppHandle = icecpp->preprocess(keepComments, "-D__SLICE2PY__");
Copy link
Member Author

Choose a reason for hiding this comment

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

I just happened across this while rging for \bComment.
It definitely looks like an unused variable, but maybe there was some IcePy magic reason for it to exist?

@InsertCreativityHere InsertCreativityHere merged commit fad9c08 into zeroc-ice:main Nov 20, 2024
18 of 19 checks passed
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.

2 participants