-
Notifications
You must be signed in to change notification settings - Fork 593
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
Update FormatType in C++ #2596
Conversation
void traceRecv(const Ice::InputStream&, const Ice::LoggerPtr&, const TraceLevelsPtr&); | ||
void trace(const char*, const Ice::OutputStream&, const Ice::LoggerPtr&, const TraceLevelsPtr&); |
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.
Was not used.
@@ -66,11 +66,4 @@ class SliceInfo | |||
public $isLastSlice; | |||
} | |||
|
|||
class FormatType |
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.
Removed because unused.
@@ -607,7 +607,7 @@ Slice::opFormatTypeToString(const OperationPtr& op) | |||
switch (op->format()) | |||
{ | |||
case DefaultFormat: | |||
return "::Ice::FormatType::DefaultFormat"; | |||
return "::std::nullopt"; |
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.
In the slice2xxx compilers, FormatType has still 3 values that correspond to the metadata.
_encoding = encoding; | ||
|
||
_format = _instance->defaultsAndOverrides()->defaultFormat; | ||
_format = instance->defaultsAndOverrides()->defaultFormat; |
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.
Shouldn't this be a second constructor? it is not clear why we use a initialize
method.
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 will clean this up in a follow-up PR.
initialize
is used by the IceDB template code, but I think we can remove it.
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.
Looks good!
This PR removes the DefaultFormat enumerator in C++. It also removes _instance from OutputStream in C++.
It's a partial C++ equivalent of #2594.