diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-01-09 15:08:36 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-01-09 15:08:36 -0330 |
commit | 57178e991716820a3e004da67c82445b7b5e9eee (patch) | |
tree | f096396438e0a83bf37d18f69ba02280cc0247da /cpp/src | |
parent | ICE-6264 ObjC add begin_ice_getConnection (diff) | |
download | ice-57178e991716820a3e004da67c82445b7b5e9eee.tar.bz2 ice-57178e991716820a3e004da67c82445b7b5e9eee.tar.xz ice-57178e991716820a3e004da67c82445b7b5e9eee.zip |
ICE-6196 replace switch statement with use of ProtocolInstance::secure()
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/winrt/StreamEndpointI.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/cpp/src/Ice/winrt/StreamEndpointI.cpp b/cpp/src/Ice/winrt/StreamEndpointI.cpp index ab8dc5be741..e71c0acd12b 100644 --- a/cpp/src/Ice/winrt/StreamEndpointI.cpp +++ b/cpp/src/Ice/winrt/StreamEndpointI.cpp @@ -91,17 +91,13 @@ IceInternal::StreamEndpointI::StreamEndpointI(const ProtocolInstancePtr& instanc EndpointInfoPtr IceInternal::StreamEndpointI::getInfo() const { - switch(_instance->type()) + if(_instance->secure()) { - case TCPEndpointType: - case WSEndpointType: - return new InfoI<Ice::TCPEndpointInfo>(_instance, _timeout, _compress, _host, _port); - case IceSSL::EndpointType: - case WSSEndpointType: return new InfoI<IceSSL::EndpointInfo>(_instance, _timeout, _compress, _host, _port); - default: - assert(false); - return 0; + } + else + { + return new InfoI<Ice::TCPEndpointInfo>(_instance, _timeout, _compress, _host, _port); } } |