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

Update FormatType in C++ #2596

Merged
merged 8 commits into from
Aug 1, 2024

Conversation

bernardnormier
Copy link
Member

This PR removes the DefaultFormat enumerator in C++. It also removes _instance from OutputStream in C++.

It's a partial C++ equivalent of #2594.

@bernardnormier bernardnormier requested review from pepone and externl July 31, 2024 22:33
void traceRecv(const Ice::InputStream&, const Ice::LoggerPtr&, const TraceLevelsPtr&);
void trace(const char*, const Ice::OutputStream&, const Ice::LoggerPtr&, const TraceLevelsPtr&);
Copy link
Member Author

Choose a reason for hiding this comment

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

Was not used.

@@ -66,11 +66,4 @@ class SliceInfo
public $isLastSlice;
}

class FormatType
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed because unused.

@@ -607,7 +607,7 @@ Slice::opFormatTypeToString(const OperationPtr& op)
switch (op->format())
{
case DefaultFormat:
return "::Ice::FormatType::DefaultFormat";
return "::std::nullopt";
Copy link
Member Author

Choose a reason for hiding this comment

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

In the slice2xxx compilers, FormatType has still 3 values that correspond to the metadata.

_encoding = encoding;

_format = _instance->defaultsAndOverrides()->defaultFormat;
_format = instance->defaultsAndOverrides()->defaultFormat;
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be a second constructor? it is not clear why we use a initialize method.

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 will clean this up in a follow-up PR.

initialize is used by the IceDB template code, but I think we can remove it.

Copy link
Member

@externl externl left a comment

Choose a reason for hiding this comment

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

Looks good!

@bernardnormier bernardnormier merged commit 41102d0 into zeroc-ice:main Aug 1, 2024
17 of 19 checks passed
@bernardnormier bernardnormier deleted the cpp-outputstream branch December 9, 2024 17:08
InsertCreativityHere pushed a commit to InsertCreativityHere/compiler-comparison that referenced this pull request Jan 1, 2025
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