summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2016-06-29 11:16:14 -0400
committerJoe George <joe@zeroc.com>2016-06-29 11:26:52 -0400
commit9d5e62c9d1c721b4fc116a5108c81162d2df8c9d (patch)
tree75b9b27e786bb64c3ffbc1fe0565dda531af2d54 /cpp
parentReduced number of symbols exported by generated code with MSVC (diff)
downloadice-9d5e62c9d1c721b4fc116a5108c81162d2df8c9d.tar.bz2
ice-9d5e62c9d1c721b4fc116a5108c81162d2df8c9d.tar.xz
ice-9d5e62c9d1c721b4fc116a5108c81162d2df8c9d.zip
Whitespace cleanup - tabs to spaces
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/src/Ice/Network.cpp12
-rw-r--r--cpp/src/Ice/PluginManagerI.cpp2
-rw-r--r--cpp/src/Ice/Selector.cpp2
-rw-r--r--cpp/src/Ice/Service.cpp8
-rwxr-xr-xcpp/src/Ice/StreamSocket.cpp8
-rwxr-xr-xcpp/src/Ice/TcpAcceptor.cpp2
-rwxr-xr-xcpp/src/Ice/UdpTransceiver.cpp24
-rw-r--r--cpp/src/IceGrid/Activator.cpp2
-rw-r--r--cpp/src/IceLocatorDiscovery/PluginI.cpp4
-rwxr-xr-xcpp/src/IceSSL/Certificate.cpp62
-rwxr-xr-xcpp/src/IceSSL/PluginI.cpp2
-rw-r--r--cpp/src/IceSSL/SChannelTransceiverI.cpp2
-rwxr-xr-xcpp/src/IceSSL/WinRTEngine.cpp2
-rwxr-xr-xcpp/src/IceSSL/WinRTTransceiverI.cpp2
-rw-r--r--cpp/src/IceSSL/uwp/AcceptorI.cpp6
-rw-r--r--cpp/src/IceSSL/uwp/AcceptorI.h4
-rw-r--r--cpp/src/IceSSL/uwp/EndpointI.cpp8
-rw-r--r--cpp/src/IceSSL/uwp/EndpointI.h6
-rw-r--r--cpp/src/IceSSL/uwp/TransceiverI.cpp26
-rw-r--r--cpp/src/IceSSL/uwp/TransceiverI.h8
-rw-r--r--cpp/src/IceUtil/UtilException.cpp452
-rw-r--r--cpp/src/Slice/PythonUtil.cpp6
-rw-r--r--cpp/src/Slice/RubyUtil.cpp2
-rw-r--r--cpp/src/slice2confluence/Gen.cpp16
-rw-r--r--cpp/src/slice2java/Gen.cpp52
-rw-r--r--cpp/test/Ice/hold/AllTests.cpp2
-rw-r--r--cpp/test/Ice/operations/Client.cpp4
-rw-r--r--cpp/test/Ice/stringConverter/Client.cpp16
-rw-r--r--cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp16
-rw-r--r--cpp/test/IceSSL/configuration/AllTests.cpp2
-rw-r--r--cpp/test/uwp/MainPage.xaml.cpp46
-rw-r--r--cpp/test/uwp/MainPage.xaml.h4
32 files changed, 405 insertions, 405 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index e0788a5d72a..5cccc3c6e61 100755
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -824,8 +824,8 @@ IceInternal::NativeInfo::completed(SocketOperation operation)
void
IceInternal::NativeInfo::queueAction(SocketOperation op, IAsyncAction^ action, bool connect)
{
- AsyncInfo* asyncInfo = getAsyncInfo(op);
- if(checkIfErrorOrCompleted(op, action, connect))
+ AsyncInfo* asyncInfo = getAsyncInfo(op);
+ if(checkIfErrorOrCompleted(op, action, connect))
{
asyncInfo->count = 0;
}
@@ -836,12 +836,12 @@ IceInternal::NativeInfo::queueAction(SocketOperation op, IAsyncAction^ action, b
{
if(status != Windows::Foundation::AsyncStatus::Completed)
{
- asyncInfo->count = SOCKET_ERROR;
- asyncInfo->error = info->ErrorCode.Value;
+ asyncInfo->count = SOCKET_ERROR;
+ asyncInfo->error = info->ErrorCode.Value;
}
else
{
- asyncInfo->count = 0;
+ asyncInfo->count = 0;
}
completed(op);
});
@@ -904,7 +904,7 @@ IceInternal::NativeInfo::checkIfErrorOrCompleted(SocketOperation op, IAsyncInfo^
// error. A canceled async status can occur if there's a timeout
// and the socket is closed.
//
- Windows::Foundation::AsyncStatus status = info->Status;
+ Windows::Foundation::AsyncStatus status = info->Status;
if(status == Windows::Foundation::AsyncStatus::Completed)
{
_completedHandler(op);
diff --git a/cpp/src/Ice/PluginManagerI.cpp b/cpp/src/Ice/PluginManagerI.cpp
index e70012fd391..090bbd593cc 100644
--- a/cpp/src/Ice/PluginManagerI.cpp
+++ b/cpp/src/Ice/PluginManagerI.cpp
@@ -481,7 +481,7 @@ Ice::PluginManagerI::loadPlugin(const string& name, const string& pluginSpec, St
}
#ifdef __IBMCPP__
- // xlC warns when casting a void* to function pointer
+ // xlC warns when casting a void* to function pointer
# pragma report(disable, "1540-0216")
#endif
diff --git a/cpp/src/Ice/Selector.cpp b/cpp/src/Ice/Selector.cpp
index ade367f2a40..bc35aff816f 100644
--- a/cpp/src/Ice/Selector.cpp
+++ b/cpp/src/Ice/Selector.cpp
@@ -548,7 +548,7 @@ Selector::finish(EventHandler* handler, bool closeNow)
#elif !defined(ICE_USE_EPOLL)
if(!_changes.empty())
{
- return false;
+ return false;
}
#endif
diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp
index 12ee34f3343..d4a11deacef 100644
--- a/cpp/src/Ice/Service.cpp
+++ b/cpp/src/Ice/Service.cpp
@@ -301,7 +301,7 @@ public:
// to Windows API.
//
LONG err = RegDeleteKeyW(HKEY_LOCAL_MACHINE,
- IceUtil::stringToWstring(createKey(source), stringConverter).c_str());
+ IceUtil::stringToWstring(createKey(source), stringConverter).c_str());
if(err != ERROR_SUCCESS)
{
SyscallException ex(__FILE__, __LINE__);
@@ -1106,7 +1106,7 @@ Ice::Service::runService(int argc, char* argv[], const InitializationData& initD
SERVICE_TABLE_ENTRYW ste[] =
{
{ const_cast<wchar_t*>(
- IceUtil::stringToWstring(_name, IceUtil::getProcessStringConverter()).c_str()),
+ IceUtil::stringToWstring(_name, IceUtil::getProcessStringConverter()).c_str()),
Ice_Service_ServiceMain },
{ 0, 0 },
};
@@ -1294,7 +1294,7 @@ Ice::Service::serviceMain(int argc, wchar_t* argv[])
// as argv come from Windows API.
//
char** args = new char*[_serviceArgs.size() + argc];
- args[0] = const_cast<char*>(IceUtil::wstringToString(argv[0], converter).c_str());
+ args[0] = const_cast<char*>(IceUtil::wstringToString(argv[0], converter).c_str());
int i = 1;
for(vector<string>::iterator p = _serviceArgs.begin(); p != _serviceArgs.end(); ++p)
{
@@ -1302,7 +1302,7 @@ Ice::Service::serviceMain(int argc, wchar_t* argv[])
}
for(int j = 1; j < argc; ++j)
{
- args[i++] = const_cast<char*>(IceUtil::wstringToString(argv[j], converter).c_str());
+ args[i++] = const_cast<char*>(IceUtil::wstringToString(argv[j], converter).c_str());
}
argc += static_cast<int>(_serviceArgs.size());
diff --git a/cpp/src/Ice/StreamSocket.cpp b/cpp/src/Ice/StreamSocket.cpp
index e890be1f829..b0964507277 100755
--- a/cpp/src/Ice/StreamSocket.cpp
+++ b/cpp/src/Ice/StreamSocket.cpp
@@ -56,9 +56,9 @@ StreamSocket::StreamSocket(const ProtocolInstancePtr& instance,
StreamSocket::StreamSocket(const ProtocolInstancePtr& instance, SOCKET fd) :
NativeInfo(fd),
_instance(instance),
- _addr(),
- _sourceAddr(),
- _state(StateConnected)
+ _addr(),
+ _sourceAddr(),
+ _state(StateConnected)
#if defined(ICE_USE_IOCP)
, _read(SocketOperationRead), _write(SocketOperationWrite)
#endif
@@ -539,7 +539,7 @@ StreamSocket::startWrite(Buffer& buf)
try
{
queueAction(SocketOperationConnect,
- safe_cast<Windows::Networking::Sockets::StreamSocket^>(_fd)->ConnectAsync(addr.host, addr.port,
+ safe_cast<Windows::Networking::Sockets::StreamSocket^>(_fd)->ConnectAsync(addr.host, addr.port,
Windows::Networking::Sockets::SocketProtectionLevel::PlainSocket), true);
}
catch(Platform::Exception^ ex)
diff --git a/cpp/src/Ice/TcpAcceptor.cpp b/cpp/src/Ice/TcpAcceptor.cpp
index e20ad639d91..bf1fd17e410 100755
--- a/cpp/src/Ice/TcpAcceptor.cpp
+++ b/cpp/src/Ice/TcpAcceptor.cpp
@@ -232,7 +232,7 @@ IceInternal::TcpAcceptor::accept()
_accepted.pop_front();
}
- return new TcpTransceiver(_instance, new StreamSocket(_instance, fd));
+ return new TcpTransceiver(_instance, new StreamSocket(_instance, fd));
}
#else
diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp
index 4c1c277829f..3ec0db137e2 100755
--- a/cpp/src/Ice/UdpTransceiver.cpp
+++ b/cpp/src/Ice/UdpTransceiver.cpp
@@ -461,18 +461,18 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf)
DataWriter^ writer = ref new DataWriter(task.get());
writer->WriteBytes(ref new Array<unsigned char>(&*buf.i, static_cast<int>(buf.b.size())));
DataWriterStoreOperation^ operation = writer->StoreAsync();
- if(operation->Status == Windows::Foundation::AsyncStatus::Completed)
- {
- //
- // NOTE: unlike other methods, it's important to modify _write.count
- // _before_ calling checkIfErrorOrCompleted since this isn't called
- // with the connection mutex but from a Windows thread pool thread.
- // So we can't modify the _write structure after calling the
- // completed callback.
- //
- _write.count = operation->GetResults();
- }
- queueOperation(SocketOperationWrite, operation);
+ if(operation->Status == Windows::Foundation::AsyncStatus::Completed)
+ {
+ //
+ // NOTE: unlike other methods, it's important to modify _write.count
+ // _before_ calling checkIfErrorOrCompleted since this isn't called
+ // with the connection mutex but from a Windows thread pool thread.
+ // So we can't modify the _write structure after calling the
+ // completed callback.
+ //
+ _write.count = operation->GetResults();
+ }
+ queueOperation(SocketOperationWrite, operation);
}
catch(Platform::Exception^ pex)
{
diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp
index b9aafc93d7b..dafb88e0f3e 100644
--- a/cpp/src/IceGrid/Activator.cpp
+++ b/cpp/src/IceGrid/Activator.cpp
@@ -1168,7 +1168,7 @@ Activator::terminationListener()
ex.error = getSystemErrno();
throw ex;
}
- clearInterrupt();
+ clearInterrupt();
//
// Collect terminated processes
diff --git a/cpp/src/IceLocatorDiscovery/PluginI.cpp b/cpp/src/IceLocatorDiscovery/PluginI.cpp
index ee1e79d9c99..42ecec87026 100644
--- a/cpp/src/IceLocatorDiscovery/PluginI.cpp
+++ b/cpp/src/IceLocatorDiscovery/PluginI.cpp
@@ -18,9 +18,9 @@ using namespace IceLocatorDiscovery;
#ifndef ICE_LOCATOR_DISCOVERY_API
# ifdef ICE_LOCATOR_DISCOVERY_API_EXPORTS
-# define ICE_LOCATOR_DISCOVERY_API ICE_DECLSPEC_EXPORT
+# define ICE_LOCATOR_DISCOVERY_API ICE_DECLSPEC_EXPORT
# else
-# define ICE_LOCATOR_DISCOVERY_API /**/
+# define ICE_LOCATOR_DISCOVERY_API /**/
# endif
#endif
diff --git a/cpp/src/IceSSL/Certificate.cpp b/cpp/src/IceSSL/Certificate.cpp
index f73c86de212..7fb39540760 100755
--- a/cpp/src/IceSSL/Certificate.cpp
+++ b/cpp/src/IceSSL/Certificate.cpp
@@ -573,24 +573,24 @@ certificateAltNames(CERT_INFO* certInfo, LPCSTR altNameOID)
vector<pair<int, string> >
certificateAltNames(Windows::Security::Cryptography::Certificates::SubjectAlternativeNameInfo^ subAltNames)
{
- vector<pair<int, string> > altNames;
- for (auto iter = subAltNames->EmailName->First(); iter->HasCurrent; iter->MoveNext())
- {
- altNames.push_back(make_pair(AltNameEmail, IceUtil::wstringToString(iter->Current->Data())));
- }
- for (auto iter = subAltNames->DnsName->First(); iter->HasCurrent; iter->MoveNext())
- {
- altNames.push_back(make_pair(AltNameDNS, IceUtil::wstringToString(iter->Current->Data())));
- }
- for (auto iter = subAltNames->Url->First(); iter->HasCurrent; iter->MoveNext())
- {
- altNames.push_back(make_pair(AltNameURL, IceUtil::wstringToString(iter->Current->Data())));
- }
- for (auto iter = subAltNames->IPAddress->First(); iter->HasCurrent; iter->MoveNext())
- {
- altNames.push_back(make_pair(AltNAmeIP, IceUtil::wstringToString(iter->Current->Data())));
- }
- return altNames;
+ vector<pair<int, string> > altNames;
+ for (auto iter = subAltNames->EmailName->First(); iter->HasCurrent; iter->MoveNext())
+ {
+ altNames.push_back(make_pair(AltNameEmail, IceUtil::wstringToString(iter->Current->Data())));
+ }
+ for (auto iter = subAltNames->DnsName->First(); iter->HasCurrent; iter->MoveNext())
+ {
+ altNames.push_back(make_pair(AltNameDNS, IceUtil::wstringToString(iter->Current->Data())));
+ }
+ for (auto iter = subAltNames->Url->First(); iter->HasCurrent; iter->MoveNext())
+ {
+ altNames.push_back(make_pair(AltNameURL, IceUtil::wstringToString(iter->Current->Data())));
+ }
+ for (auto iter = subAltNames->IPAddress->First(); iter->HasCurrent; iter->MoveNext())
+ {
+ altNames.push_back(make_pair(AltNAmeIP, IceUtil::wstringToString(iter->Current->Data())));
+ }
+ return altNames;
}
#endif
@@ -1436,12 +1436,12 @@ Certificate::encode() const
BIO_free(out);
return result;
#elif defined(ICE_OS_WINRT)
- auto reader = Windows::Storage::Streams::DataReader::FromBuffer(_cert->GetCertificateBlob());
- std::vector<unsigned char> data(reader->UnconsumedBufferLength);
- if (!data.empty())
- {
- reader->ReadBytes(Platform::ArrayReference<unsigned char>(&data[0], static_cast<unsigned int>(data.size())));
- }
+ auto reader = Windows::Storage::Streams::DataReader::FromBuffer(_cert->GetCertificateBlob());
+ std::vector<unsigned char> data(reader->UnconsumedBufferLength);
+ if (!data.empty())
+ {
+ reader->ReadBytes(Platform::ArrayReference<unsigned char>(&data[0], static_cast<unsigned int>(data.size())));
+ }
ostringstream os;
os << "-----BEGIN CERTIFICATE-----\n";
os << IceInternal::Base64::encode(data);
@@ -1535,12 +1535,12 @@ Certificate::getSerialNumber() const
return result;
#elif defined(ICE_OS_WINRT)
ostringstream os;
- os.fill(0);
- os.width(2);
- for (unsigned int i = 0; i < _cert->SerialNumber->Length; i++)
- {
- os << hex << static_cast<int>(_cert->SerialNumber[i]);
- }
+ os.fill(0);
+ os.width(2);
+ for (unsigned int i = 0; i < _cert->SerialNumber->Length; i++)
+ {
+ os << hex << static_cast<int>(_cert->SerialNumber[i]);
+ }
return IceUtilInternal::toUpper(os.str());
#else
# error "Unknown platform"
@@ -1765,4 +1765,4 @@ Certificate::initializeAttributes() const
CFRelease(attributes);
}
-#endif \ No newline at end of file
+#endif
diff --git a/cpp/src/IceSSL/PluginI.cpp b/cpp/src/IceSSL/PluginI.cpp
index fb29af51d78..2e3cbe10414 100755
--- a/cpp/src/IceSSL/PluginI.cpp
+++ b/cpp/src/IceSSL/PluginI.cpp
@@ -92,7 +92,7 @@ IceSSL::PluginI::PluginI(const Ice::CommunicatorPtr& com)
//
IceInternal::ProtocolPluginFacadePtr pluginFacade = IceInternal::getProtocolPluginFacade(com);
- // SSL based on TCP
+ // SSL based on TCP
IceInternal::EndpointFactoryPtr tcp = pluginFacade->getEndpointFactory(TCPEndpointType);
if(tcp)
{
diff --git a/cpp/src/IceSSL/SChannelTransceiverI.cpp b/cpp/src/IceSSL/SChannelTransceiverI.cpp
index d7555d545a9..87505808cd3 100644
--- a/cpp/src/IceSSL/SChannelTransceiverI.cpp
+++ b/cpp/src/IceSSL/SChannelTransceiverI.cpp
@@ -359,7 +359,7 @@ IceSSL::TransceiverI::sslHandshake()
break; // We're done.
}
- // Otherwise continue either reading credentials
+ // Otherwise continue either reading credentials
}
if(_state == StateHandshakeWriteContinue)
diff --git a/cpp/src/IceSSL/WinRTEngine.cpp b/cpp/src/IceSSL/WinRTEngine.cpp
index 7eb59f922a7..a6dc675c581 100755
--- a/cpp/src/IceSSL/WinRTEngine.cpp
+++ b/cpp/src/IceSSL/WinRTEngine.cpp
@@ -31,7 +31,7 @@ WinRTEngine::initialize()
bool
WinRTEngine::initialized() const
{
- return true;
+ return true;
}
void
diff --git a/cpp/src/IceSSL/WinRTTransceiverI.cpp b/cpp/src/IceSSL/WinRTTransceiverI.cpp
index be0d632eaf8..5c7058a3d31 100755
--- a/cpp/src/IceSSL/WinRTTransceiverI.cpp
+++ b/cpp/src/IceSSL/WinRTTransceiverI.cpp
@@ -61,7 +61,7 @@ IceSSL::TransceiverI::closing(bool initiator, exception_ptr ex)
IceSSL::TransceiverI::closing(bool initiator, const Ice::LocalException& ex)
#endif
{
- return _delegate->closing(initiator, ex);
+ return _delegate->closing(initiator, ex);
}
void
diff --git a/cpp/src/IceSSL/uwp/AcceptorI.cpp b/cpp/src/IceSSL/uwp/AcceptorI.cpp
index 8f6c5dfc2aa..c7732d5b1c5 100644
--- a/cpp/src/IceSSL/uwp/AcceptorI.cpp
+++ b/cpp/src/IceSSL/uwp/AcceptorI.cpp
@@ -56,14 +56,14 @@ IceSSL::AcceptorI::close()
{
for(deque<StreamSocket^>::const_iterator p = _accepted.begin(); p != _accepted.end(); ++p)
{
- IceInternal::closeSocket(*p);
+ IceInternal::closeSocket(*p);
}
_accepted.clear();
}
if(_fd != INVALID_SOCKET)
{
- IceInternal::closeSocketNoThrow(_fd);
+ IceInternal::closeSocketNoThrow(_fd);
_fd = INVALID_SOCKET;
}
}
@@ -201,7 +201,7 @@ IceSSL::AcceptorI::queueAcceptedSocket(StreamSocket^ socket)
IceUtil::Mutex::Lock lock(_mutex);
if(_fd == INVALID_SOCKET) // Acceptor was closed.
{
- IceInternal::closeSocket(socket);
+ IceInternal::closeSocket(socket);
return;
}
_accepted.push_back(socket);
diff --git a/cpp/src/IceSSL/uwp/AcceptorI.h b/cpp/src/IceSSL/uwp/AcceptorI.h
index 027db83c437..b64b2bde924 100644
--- a/cpp/src/IceSSL/uwp/AcceptorI.h
+++ b/cpp/src/IceSSL/uwp/AcceptorI.h
@@ -24,7 +24,7 @@ namespace IceSSL
{
class AcceptorI : public IceInternal::Acceptor,
- public IceInternal::NativeInfo
+ public IceInternal::NativeInfo
{
public:
@@ -58,7 +58,7 @@ private:
IceUtil::Mutex _mutex;
bool _acceptPending;
- IceInternal::SocketOperationCompletedHandler^ _completedHandler;
+ IceInternal::SocketOperationCompletedHandler^ _completedHandler;
std::deque<Windows::Networking::Sockets::StreamSocket^> _accepted;
};
diff --git a/cpp/src/IceSSL/uwp/EndpointI.cpp b/cpp/src/IceSSL/uwp/EndpointI.cpp
index 2907c8f51b2..846bcab6d23 100644
--- a/cpp/src/IceSSL/uwp/EndpointI.cpp
+++ b/cpp/src/IceSSL/uwp/EndpointI.cpp
@@ -87,7 +87,7 @@ IceSSL::EndpointI::getInfo() const
}
else
{
- info = ICE_MAKE_SHARED(IceInternal::InfoI<Ice::TCPEndpointInfo>, shared_from_this());
+ info = ICE_MAKE_SHARED(IceInternal::InfoI<Ice::TCPEndpointInfo>, shared_from_this());
}
fillEndpointInfo(info.get());
return info;
@@ -308,8 +308,8 @@ void
IceSSL::EndpointI::hashInit(Ice::Int& h) const
{
IPEndpointI::hashInit(h);
- IceInternal::hashAdd(h, _timeout);
- IceInternal::hashAdd(h, _compress);
+ IceInternal::hashAdd(h, _timeout);
+ IceInternal::hashAdd(h, _compress);
}
void
@@ -418,7 +418,7 @@ IceSSL::EndpointFactoryI::protocol() const
IceInternal::EndpointIPtr
IceSSL::EndpointFactoryI::create(vector<string>& args, bool oaEndpoint) const
{
- IceInternal::IPEndpointIPtr endpt = ICE_MAKE_SHARED(EndpointI, _instance);
+ IceInternal::IPEndpointIPtr endpt = ICE_MAKE_SHARED(EndpointI, _instance);
endpt->initWithOptions(args, oaEndpoint);
return endpt;
}
diff --git a/cpp/src/IceSSL/uwp/EndpointI.h b/cpp/src/IceSSL/uwp/EndpointI.h
index 55fafa9f1bb..02b2ecab644 100644
--- a/cpp/src/IceSSL/uwp/EndpointI.h
+++ b/cpp/src/IceSSL/uwp/EndpointI.h
@@ -51,7 +51,7 @@ public:
virtual bool operator<(const Ice::LocalObject&) const;
#endif
- EndpointIPtr endpoint(const AcceptorIPtr&) const;
+ EndpointIPtr endpoint(const AcceptorIPtr&) const;
using IceInternal::IPEndpointI::connectionId;
@@ -79,7 +79,7 @@ class EndpointFactoryI : public IceInternal::EndpointFactory
{
public:
- EndpointFactoryI(const IceInternal::ProtocolInstancePtr&);
+ EndpointFactoryI(const IceInternal::ProtocolInstancePtr&);
virtual Ice::Short type() const;
virtual std::string protocol() const;
@@ -91,7 +91,7 @@ public:
private:
- IceInternal::ProtocolInstancePtr _instance;
+ IceInternal::ProtocolInstancePtr _instance;
};
}
diff --git a/cpp/src/IceSSL/uwp/TransceiverI.cpp b/cpp/src/IceSSL/uwp/TransceiverI.cpp
index ce9e2f769d6..06ef9f8a6e1 100644
--- a/cpp/src/IceSSL/uwp/TransceiverI.cpp
+++ b/cpp/src/IceSSL/uwp/TransceiverI.cpp
@@ -78,7 +78,7 @@ IceSSL::TransceiverI::initialize(IceInternal::Buffer&, IceInternal::Buffer&)
{
if(_write.count == SOCKET_ERROR)
{
- IceInternal::checkConnectErrorCode(__FILE__, __LINE__, _write.error, _connectAddr.host);
+ IceInternal::checkConnectErrorCode(__FILE__, __LINE__, _write.error, _connectAddr.host);
}
_state = StateConnected;
_desc = IceInternal::fdToString(_fd);
@@ -110,7 +110,7 @@ IceSSL::TransceiverI::close()
try
{
- IceInternal::closeSocket(_fd);
+ IceInternal::closeSocket(_fd);
_fd = INVALID_SOCKET;
}
catch(const SocketException&)
@@ -145,7 +145,7 @@ IceSSL::TransceiverI::startWrite(IceInternal::Buffer& buf)
if(!checkIfErrorOrCompleted(IceInternal::SocketOperationConnect, action))
{
- IceInternal::SocketOperationCompletedHandler^ completed = _completedHandler;
+ IceInternal::SocketOperationCompletedHandler^ completed = _completedHandler;
action->Completed = ref new AsyncActionCompletedHandler(
[=] (IAsyncAction^ info, Windows::Foundation::AsyncStatus status)
{
@@ -164,7 +164,7 @@ IceSSL::TransceiverI::startWrite(IceInternal::Buffer& buf)
}
catch(Platform::Exception^ ex)
{
- IceInternal::checkConnectErrorCode(__FILE__, __LINE__, ex->HResult, _connectAddr.host);
+ IceInternal::checkConnectErrorCode(__FILE__, __LINE__, ex->HResult, _connectAddr.host);
}
return false;
}
@@ -193,7 +193,7 @@ IceSSL::TransceiverI::startWrite(IceInternal::Buffer& buf)
}
catch(Platform::Exception^ ex)
{
- IceInternal::checkErrorCode(__FILE__, __LINE__, ex->HResult);
+ IceInternal::checkErrorCode(__FILE__, __LINE__, ex->HResult);
}
return packetSize == static_cast<int>(buf.b.end() - buf.i);
}
@@ -205,7 +205,7 @@ IceSSL::TransceiverI::finishWrite(IceInternal::Buffer& buf)
{
if(_write.count == SOCKET_ERROR)
{
- IceInternal::checkConnectErrorCode(__FILE__, __LINE__, _write.error, _connectAddr.host);
+ IceInternal::checkConnectErrorCode(__FILE__, __LINE__, _write.error, _connectAddr.host);
}
_verified = true;
return;
@@ -213,7 +213,7 @@ IceSSL::TransceiverI::finishWrite(IceInternal::Buffer& buf)
if(_write.count == SOCKET_ERROR)
{
- IceInternal::checkErrorCode(__FILE__, __LINE__, _write.error);
+ IceInternal::checkErrorCode(__FILE__, __LINE__, _write.error);
}
buf.i += _write.count;
@@ -243,7 +243,7 @@ IceSSL::TransceiverI::startRead(IceInternal::Buffer& buf)
}
catch(Platform::Exception^ ex)
{
- IceInternal::checkErrorCode(__FILE__, __LINE__, ex->HResult);
+ IceInternal::checkErrorCode(__FILE__, __LINE__, ex->HResult);
}
}
@@ -252,7 +252,7 @@ IceSSL::TransceiverI::finishRead(IceInternal::Buffer& buf)
{
if(_read.count == SOCKET_ERROR)
{
- IceInternal::checkErrorCode(__FILE__, __LINE__, _read.error);
+ IceInternal::checkErrorCode(__FILE__, __LINE__, _read.error);
}
else if(_read.count == 0)
{
@@ -269,7 +269,7 @@ IceSSL::TransceiverI::finishRead(IceInternal::Buffer& buf)
}
catch(Platform::Exception^ ex)
{
- IceInternal::checkErrorCode(__FILE__, __LINE__, ex->HResult);
+ IceInternal::checkErrorCode(__FILE__, __LINE__, ex->HResult);
}
buf.i += _read.count;
@@ -402,11 +402,11 @@ IceSSL::TransceiverI::checkIfErrorOrCompleted(IceInternal::SocketOperation op, I
{
if(_state < StateConnected)
{
- IceInternal::checkConnectErrorCode(__FILE__, __LINE__, info->ErrorCode.Value, _connectAddr.host);
+ IceInternal::checkConnectErrorCode(__FILE__, __LINE__, info->ErrorCode.Value, _connectAddr.host);
}
else
{
- IceInternal::checkErrorCode(__FILE__, __LINE__, info->ErrorCode.Value);
+ IceInternal::checkErrorCode(__FILE__, __LINE__, info->ErrorCode.Value);
}
return true; // Prevent compiler warning.
}
@@ -415,7 +415,7 @@ IceSSL::TransceiverI::checkIfErrorOrCompleted(IceInternal::SocketOperation op, I
void
IceSSL::TransceiverI::fillConnectionInfo(const Ice::IPConnectionInfoPtr& info) const
{
- IceInternal::fdToAddressAndPort(_fd, info->localAddress, info->localPort, info->remoteAddress, info->remotePort);
+ IceInternal::fdToAddressAndPort(_fd, info->localAddress, info->localPort, info->remoteAddress, info->remotePort);
info->rcvSize = IceInternal::getRecvBufferSize(_fd);
info->sndSize = IceInternal::getSendBufferSize(_fd);
}
diff --git a/cpp/src/IceSSL/uwp/TransceiverI.h b/cpp/src/IceSSL/uwp/TransceiverI.h
index 8dd2808e982..ef7a51fb7af 100644
--- a/cpp/src/IceSSL/uwp/TransceiverI.h
+++ b/cpp/src/IceSSL/uwp/TransceiverI.h
@@ -39,7 +39,7 @@ public:
virtual IceInternal::SocketOperation initialize(IceInternal::Buffer&, IceInternal::Buffer&);
#ifdef ICE_CPP11_MAPPING
- virtual IceInternal::SocketOperation closing(bool, std::exception_ptr);
+ virtual IceInternal::SocketOperation closing(bool, std::exception_ptr);
#else
virtual IceInternal::SocketOperation closing(bool, const Ice::LocalException&);
#endif
@@ -77,10 +77,10 @@ private:
State _state;
std::string _desc;
bool _verified;
- IceInternal::Address _connectAddr;
+ IceInternal::Address _connectAddr;
- IceInternal::AsyncInfo _read;
- IceInternal::AsyncInfo _write;
+ IceInternal::AsyncInfo _read;
+ IceInternal::AsyncInfo _write;
int _maxSendPacketSize;
int _maxReceivePacketSize;
diff --git a/cpp/src/IceUtil/UtilException.cpp b/cpp/src/IceUtil/UtilException.cpp
index ec15dc7bff7..734ae013e9d 100644
--- a/cpp/src/IceUtil/UtilException.cpp
+++ b/cpp/src/IceUtil/UtilException.cpp
@@ -43,7 +43,7 @@
# include <algorithm>
# include <cxxabi.h>
# else
- // It's available but we cant' use it - shouldn't happen
+ // It's available but we cant' use it - shouldn't happen
# undef ICE_LIBBACKTRACE
# endif
# endif
@@ -127,24 +127,24 @@ public:
Init()
{
- globalMutex = new IceUtil::Mutex;
+ globalMutex = new IceUtil::Mutex;
#ifdef ICE_LIBBACKTRACE
- // Leaked, as libbacktrace does not provide an API to free
- // this state
- bstate = backtrace_create_state(0, 1, ignoreErrorCallback, 0);
+ // Leaked, as libbacktrace does not provide an API to free
+ // this state
+ bstate = backtrace_create_state(0, 1, ignoreErrorCallback, 0);
#endif
}
~Init()
{
- delete globalMutex;
- globalMutex = 0;
+ delete globalMutex;
+ globalMutex = 0;
#ifdef ICE_DBGHELP
- if(process != 0)
- {
- SymCleanup(process);
- process = 0;
- }
+ if(process != 0)
+ {
+ SymCleanup(process);
+ process = 0;
+ }
#endif
}
};
@@ -156,10 +156,10 @@ Init init;
struct FrameInfo
{
FrameInfo(int i, uintptr_t p) :
- index(i),
- pc(p),
- fallback(0),
- setByErrorCb(false)
+ index(i),
+ pc(p),
+ fallback(0),
+ setByErrorCb(false)
{
}
@@ -176,47 +176,47 @@ decode(const string& line, string& function, string& filename)
string::size_type openParen = line.find_first_of('(');
if(openParen != string::npos)
{
- //
- // Format: "/opt/Ice/lib/libIceUtil.so.33(_ZN7IceUtil9ExceptionC2EPKci+0x51) [0x73b267]"
- //
- string::size_type closeParen = line.find_first_of(')', openParen);
- if(closeParen != string::npos)
- {
- string tmp = line.substr(openParen + 1, closeParen - openParen - 1);
- string::size_type plus = tmp.find_last_of('+');
- if(plus != string::npos)
- {
- function = tmp.substr(0 , plus);
- filename = line.substr(0, openParen);
- }
- }
+ //
+ // Format: "/opt/Ice/lib/libIceUtil.so.33(_ZN7IceUtil9ExceptionC2EPKci+0x51) [0x73b267]"
+ //
+ string::size_type closeParen = line.find_first_of(')', openParen);
+ if(closeParen != string::npos)
+ {
+ string tmp = line.substr(openParen + 1, closeParen - openParen - 1);
+ string::size_type plus = tmp.find_last_of('+');
+ if(plus != string::npos)
+ {
+ function = tmp.substr(0 , plus);
+ filename = line.substr(0, openParen);
+ }
+ }
}
else
{
- //
- // Format: "1 libIce.3.3.1.dylib 0x000933a1 _ZN7IceUtil9ExceptionC2EPKci + 71"
- //
- string::size_type plus = line.find_last_of('+');
- if(plus != string::npos)
- {
- string tmp = line.substr(0, plus - 1);
- string::size_type space = tmp.find_last_of(" \t");
- if(space != string::npos)
- {
- tmp = tmp.substr(space + 1, tmp.size() - space);
-
- string::size_type start = line.find_first_not_of(" \t", 3);
- if(start != string::npos)
- {
- string::size_type finish = line.find_first_of(" \t", start);
- if(finish != string::npos)
- {
- function = tmp;
- filename = line.substr(start, finish - start);
- }
- }
- }
- }
+ //
+ // Format: "1 libIce.3.3.1.dylib 0x000933a1 _ZN7IceUtil9ExceptionC2EPKci + 71"
+ //
+ string::size_type plus = line.find_last_of('+');
+ if(plus != string::npos)
+ {
+ string tmp = line.substr(0, plus - 1);
+ string::size_type space = tmp.find_last_of(" \t");
+ if(space != string::npos)
+ {
+ tmp = tmp.substr(space + 1, tmp.size() - space);
+
+ string::size_type start = line.find_first_not_of(" \t", 3);
+ if(start != string::npos)
+ {
+ string::size_type finish = line.find_first_of(" \t", start);
+ if(finish != string::npos)
+ {
+ function = tmp;
+ filename = line.substr(start, finish - start);
+ }
+ }
+ }
+ }
}
}
@@ -232,52 +232,52 @@ printFrame(void* data, uintptr_t pc, const char* filename, int lineno, const cha
if(!function && frameInfo.fallback)
{
- // Extract function and filename from fallback
- decode(frameInfo.fallback, functionHolder, filenameHolder);
- if(!functionHolder.empty())
- {
- function = functionHolder.c_str();
- }
- if(!filename && !filenameHolder.empty())
- {
- filename = filenameHolder.c_str();
- }
+ // Extract function and filename from fallback
+ decode(frameInfo.fallback, functionHolder, filenameHolder);
+ if(!functionHolder.empty())
+ {
+ function = functionHolder.c_str();
+ }
+ if(!filename && !filenameHolder.empty())
+ {
+ filename = filenameHolder.c_str();
+ }
}
int ret = 0;
if(function)
{
- char* demangledFunction = abi::__cxa_demangle(function, 0, 0, 0);
- if(demangledFunction)
- {
- os << demangledFunction;
- free(demangledFunction);
- }
- else
- {
- os << function;
- }
-
- if(filename && lineno > 0)
- {
- os << " at " << filename << ":" << lineno;
- }
- else if(filename)
- {
- os << " in " << filename;
- }
+ char* demangledFunction = abi::__cxa_demangle(function, 0, 0, 0);
+ if(demangledFunction)
+ {
+ os << demangledFunction;
+ free(demangledFunction);
+ }
+ else
+ {
+ os << function;
+ }
+
+ if(filename && lineno > 0)
+ {
+ os << " at " << filename << ":" << lineno;
+ }
+ else if(filename)
+ {
+ os << " in " << filename;
+ }
}
else if(frameInfo.fallback)
{
- // decode was not able to parse this string
- os << frameInfo.fallback;
- ret = 1;
+ // decode was not able to parse this string
+ os << frameInfo.fallback;
+ ret = 1;
}
else
{
- os << hex << setw(sizeof(uintptr_t) * 2) << setfill('0') << pc;
- ret = 2;
+ os << hex << setw(sizeof(uintptr_t) * 2) << setfill('0') << pc;
+ ret = 2;
}
os << "\n";
frameInfo.output = os.str();
@@ -303,13 +303,13 @@ addFrame(void* sf, uintptr_t pc)
{
if(pc != UINTPTR_MAX)
{
- vector<void*>* stackFrames = reinterpret_cast<vector<void*>*>(sf);
- stackFrames->push_back(reinterpret_cast<void*>(pc));
- return 0;
+ vector<void*>* stackFrames = reinterpret_cast<vector<void*>*>(sf);
+ stackFrames->push_back(reinterpret_cast<void*>(pc));
+ return 0;
}
else
{
- return 1;
+ return 1;
}
}
#endif
@@ -321,7 +321,7 @@ getStackFrames()
if(!IceUtilInternal::printStackTraces)
{
- return stackFrames;
+ return stackFrames;
}
#if defined(ICE_DBGHELP)
@@ -346,7 +346,7 @@ getStackFrames()
stackFrames.resize(stackDepth);
if(!stackFrames.empty())
{
- stackFrames.erase(stackFrames.begin()); // drop the first frame
+ stackFrames.erase(stackFrames.begin()); // drop the first frame
}
#endif
@@ -359,7 +359,7 @@ getStackTrace(const vector<void*>& stackFrames)
{
if(stackFrames.empty())
{
- return "";
+ return "";
}
string stackTrace;
@@ -372,68 +372,68 @@ getStackTrace(const vector<void*>& stackFrames)
IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(globalMutex);
if(process == 0)
{
- //
- // Compute Search path (best effort)
- // consists of the current working directory, this DLL (or exe) directory and %_NT_SYMBOL_PATH%
- //
- basic_string<TCHAR> searchPath;
- const TCHAR pathSeparator = _T('\\');
- const TCHAR searchPathSeparator = _T(';');
-
- TCHAR cwd[MAX_PATH];
- if(GetCurrentDirectory(MAX_PATH, cwd) != 0)
- {
- searchPath = cwd;
- }
-
- HMODULE myModule = 0;
- GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
- "startHook",
- &myModule);
- //
- // If GetModuleHandleEx fails, myModule is NULL, i.e. we'll locate the current exe's directory.
- //
-
- TCHAR myFilename[MAX_PATH];
- DWORD len = GetModuleFileName(myModule, myFilename, MAX_PATH);
- if(len != 0 && len < MAX_PATH)
- {
- assert(myFilename[len] == 0);
-
- basic_string<TCHAR> myPath = myFilename;
- size_t pos = myPath.find_last_of(pathSeparator);
- if(pos != basic_string<TCHAR>::npos)
- {
- myPath = myPath.substr(0, pos);
-
- if(!searchPath.empty())
- {
- searchPath += searchPathSeparator;
- }
- searchPath += myPath;
- }
- }
-
- const DWORD size = 1024;
- TCHAR symbolPath[size];
- len = GetEnvironmentVariable(_T("_NT_SYMBOL_PATH"), symbolPath, size);
- if(len > 0 && len < size)
- {
- if(!searchPath.empty())
- {
- searchPath += searchPathSeparator;
- }
- searchPath += symbolPath;
- }
-
- process = GetCurrentProcess();
-
- SymSetOptions(SYMOPT_LOAD_LINES | SYMOPT_DEFERRED_LOADS | SYMOPT_EXACT_SYMBOLS | SYMOPT_UNDNAME);
- if(SymInitialize(process, searchPath.c_str(), TRUE) == 0)
- {
- process = 0;
- return "No stack trace: SymInitialize failed with " + IceUtilInternal::errorToString(GetLastError());
- }
+ //
+ // Compute Search path (best effort)
+ // consists of the current working directory, this DLL (or exe) directory and %_NT_SYMBOL_PATH%
+ //
+ basic_string<TCHAR> searchPath;
+ const TCHAR pathSeparator = _T('\\');
+ const TCHAR searchPathSeparator = _T(';');
+
+ TCHAR cwd[MAX_PATH];
+ if(GetCurrentDirectory(MAX_PATH, cwd) != 0)
+ {
+ searchPath = cwd;
+ }
+
+ HMODULE myModule = 0;
+ GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
+ "startHook",
+ &myModule);
+ //
+ // If GetModuleHandleEx fails, myModule is NULL, i.e. we'll locate the current exe's directory.
+ //
+
+ TCHAR myFilename[MAX_PATH];
+ DWORD len = GetModuleFileName(myModule, myFilename, MAX_PATH);
+ if(len != 0 && len < MAX_PATH)
+ {
+ assert(myFilename[len] == 0);
+
+ basic_string<TCHAR> myPath = myFilename;
+ size_t pos = myPath.find_last_of(pathSeparator);
+ if(pos != basic_string<TCHAR>::npos)
+ {
+ myPath = myPath.substr(0, pos);
+
+ if(!searchPath.empty())
+ {
+ searchPath += searchPathSeparator;
+ }
+ searchPath += myPath;
+ }
+ }
+
+ const DWORD size = 1024;
+ TCHAR symbolPath[size];
+ len = GetEnvironmentVariable(_T("_NT_SYMBOL_PATH"), symbolPath, size);
+ if(len > 0 && len < size)
+ {
+ if(!searchPath.empty())
+ {
+ searchPath += searchPathSeparator;
+ }
+ searchPath += symbolPath;
+ }
+
+ process = GetCurrentProcess();
+
+ SymSetOptions(SYMOPT_LOAD_LINES | SYMOPT_DEFERRED_LOADS | SYMOPT_EXACT_SYMBOLS | SYMOPT_UNDNAME);
+ if(SymInitialize(process, searchPath.c_str(), TRUE) == 0)
+ {
+ process = 0;
+ return "No stack trace: SymInitialize failed with " + IceUtilInternal::errorToString(GetLastError());
+ }
}
lock.release();
@@ -464,37 +464,37 @@ getStackTrace(const vector<void*>& stackFrames)
#endif
for(size_t i = 0; i < stackFrames.size(); i++)
{
- ostringstream s;
- s << setw(3) << i << " ";
+ ostringstream s;
+ s << setw(3) << i << " ";
- DWORD64 address = reinterpret_cast<DWORD64>(stackFrames[i]);
+ DWORD64 address = reinterpret_cast<DWORD64>(stackFrames[i]);
- BOOL ok = SymFromAddr(process, address, 0, symbol);
- if(ok)
- {
+ BOOL ok = SymFromAddr(process, address, 0, symbol);
+ if(ok)
+ {
#ifdef DBGHELP_TRANSLATE_TCHAR
- s << IceUtil::wstringToString(symbol->Name, converter);
+ s << IceUtil::wstringToString(symbol->Name, converter);
#else
- s << symbol->Name;
+ s << symbol->Name;
#endif
- ok = SymGetLineFromAddr64(process, address, &displacement, &line);
- if(ok)
- {
- s << " at "
+ ok = SymGetLineFromAddr64(process, address, &displacement, &line);
+ if(ok)
+ {
+ s << " at "
#ifdef DBGHELP_TRANSLATE_TCHAR
<< IceUtil::wstringToString(line.FileName, converter)
#else
- << line.FileName
-#endif
- << ":" << line.LineNumber;
- }
- }
- else
- {
- s << hex << setw(sizeof(DWORD64) * 2) << setfill('0') << address;
- }
- s << "\n";
- stackTrace += s.str();
+ << line.FileName
+#endif
+ << ":" << line.LineNumber;
+ }
+ }
+ else
+ {
+ s << hex << setw(sizeof(DWORD64) * 2) << setfill('0') << address;
+ }
+ s << "\n";
+ stackTrace += s.str();
}
lock.release();
@@ -512,51 +512,51 @@ getStackTrace(const vector<void*>& stackFrames)
// Initialize backtraceStrings immediately
if(p != stackFrames.end())
{
- backtraceStrings = backtrace_symbols(&*p, stackFrames.size());
+ backtraceStrings = backtrace_symbols(&*p, stackFrames.size());
}
# endif
do
{
- FrameInfo frameInfo(frameIndex, reinterpret_cast<uintptr_t>(*p));
- bool retry = false;
+ FrameInfo frameInfo(frameIndex, reinterpret_cast<uintptr_t>(*p));
+ bool retry = false;
- if(backtraceStrings)
- {
- frameInfo.fallback = backtraceStrings[frameIndex - offset];
- }
+ if(backtraceStrings)
+ {
+ frameInfo.fallback = backtraceStrings[frameIndex - offset];
+ }
# if defined(ICE_LIBBACKTRACE)
- bool ok = backtrace_pcinfo(bstate, frameInfo.pc, printFrame, handlePcInfoError, &frameInfo) == 0;
+ bool ok = backtrace_pcinfo(bstate, frameInfo.pc, printFrame, handlePcInfoError, &frameInfo) == 0;
- // When error callback is called, pcinfo returns 0
- if(!ok || frameInfo.setByErrorCb)
- {
+ // When error callback is called, pcinfo returns 0
+ if(!ok || frameInfo.setByErrorCb)
+ {
# if defined(ICE_BACKTRACE)
- if(!backtraceStringsInitialized)
- {
- offset = frameIndex;
- // Initialize backtraceStrings as fallback
- backtraceStrings = backtrace_symbols(&*p, stackFrames.size() - offset);
- backtraceStringsInitialized = true;
- retry = true;
- }
+ if(!backtraceStringsInitialized)
+ {
+ offset = frameIndex;
+ // Initialize backtraceStrings as fallback
+ backtraceStrings = backtrace_symbols(&*p, stackFrames.size() - offset);
+ backtraceStringsInitialized = true;
+ retry = true;
+ }
# endif
- }
+ }
# else // not using libbacktrace:
- printFrame(&frameInfo, frameInfo.pc, 0, 0, 0);
+ printFrame(&frameInfo, frameInfo.pc, 0, 0, 0);
# endif
- if(!retry)
- {
- stackTrace += frameInfo.output;
- ++p;
- ++frameIndex;
- }
+ if(!retry)
+ {
+ stackTrace += frameInfo.output;
+ ++p;
+ ++frameIndex;
+ }
} while(p != stackFrames.end());
if(backtraceStrings)
{
- free(backtraceStrings);
+ free(backtraceStrings);
}
#endif
@@ -589,7 +589,7 @@ IceUtil::Exception::ice_print(ostream& out) const
{
if(_file && _line > 0)
{
- out << _file << ':' << _line << ": ";
+ out << _file << ':' << _line << ": ";
}
out << ice_id();
}
@@ -599,16 +599,16 @@ IceUtil::Exception::what() const ICE_NOEXCEPT
{
try
{
- IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(globalMutex);
- {
- if(_str.empty())
- {
- stringstream s;
- ice_print(s);
- _str = s.str(); // Lazy initialization.
- }
- }
- return _str.c_str();
+ IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(globalMutex);
+ {
+ if(_str.empty())
+ {
+ stringstream s;
+ ice_print(s);
+ _str = s.str(); // Lazy initialization.
+ }
+ }
+ return _str.c_str();
}
catch(...)
{
@@ -622,11 +622,11 @@ IceUtil::Exception::ice_clone() const
{
try
{
- ice_throw();
+ ice_throw();
}
catch(...)
{
- return current_exception();
+ return current_exception();
}
assert(false);
return nullptr; // Make compilers happy
@@ -670,7 +670,7 @@ IceUtil::NullHandleException::NullHandleException(const char* file, int line) :
{
if(IceUtilInternal::nullHandleAbort)
{
- abort();
+ abort();
}
}
@@ -758,7 +758,7 @@ IceUtil::IllegalConversionException::IllegalConversionException(const char* file
{}
IceUtil::IllegalConversionException::IllegalConversionException(const char* file, int line,
- const string& reason):
+ const string& reason):
Exception(file, line),
_reason(reason)
{}
@@ -817,7 +817,7 @@ IceUtil::SyscallException::ice_print(ostream& os) const
Exception::ice_print(os);
if(_error != 0)
{
- os << ":\nsyscall exception: " << IceUtilInternal::errorToString(_error);
+ os << ":\nsyscall exception: " << IceUtilInternal::errorToString(_error);
}
}
@@ -868,7 +868,7 @@ IceUtil::FileLockException::ice_print(ostream& os) const
os << ":\ncould not lock file: `" << _path << "'";
if(_error != 0)
{
- os << "\nsyscall exception: " << IceUtilInternal::errorToString(_error);
+ os << "\nsyscall exception: " << IceUtilInternal::errorToString(_error);
}
}
@@ -903,7 +903,7 @@ IceUtil::OptionalNotSetException::OptionalNotSetException(const char* file, int
{
if(IceUtilInternal::nullHandleAbort)
{
- abort();
+ abort();
}
}
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index f04ccfcb4c7..89a459979fd 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -734,7 +734,7 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "uncheckedCast = staticmethod(uncheckedCast)";
- //
+ //
// ice_staticId
//
_out << sp << nl << "def ice_staticId():";
@@ -743,7 +743,7 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
_out.dec();
_out << nl << "ice_staticId = staticmethod(ice_staticId)";
- _out.dec();
+ _out.dec();
_out << sp << nl << "_M_" << prxType << " = IcePy.defineProxy('" << scoped << "', " << prxName << ")";
}
@@ -1062,7 +1062,7 @@ Slice::Python::CodeVisitor::visitExceptionStart(const ExceptionPtr& p)
_out << nl << "return IcePy.stringifyException(self)";
_out.dec();
_out << sp << nl << "__repr__ = __str__";
-
+
//
// _ice_id
//
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp
index 8d2efd8a0e1..d561c8db755 100644
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@ -551,7 +551,7 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
_out.dec();
_out << nl << "end";
- _out << nl << "def " << name << "Prx.ice_staticId()";
+ _out << nl << "def " << name << "Prx.ice_staticId()";
_out.inc();
_out << nl << "'" << scoped << "'";
_out.dec();
diff --git a/cpp/src/slice2confluence/Gen.cpp b/cpp/src/slice2confluence/Gen.cpp
index 88eda488445..f62bd1f6fb8 100644
--- a/cpp/src/slice2confluence/Gen.cpp
+++ b/cpp/src/slice2confluence/Gen.cpp
@@ -1392,14 +1392,14 @@ Slice::GeneratorBase::getLinkPath(const SyntaxTreeBasePtr& p, const ContainerPtr
{
// Intra-package links need package name, unlike with html dir structure
EnumeratorPtr enumerator = EnumeratorPtr::dynamicCast(p);
- if(enumerator)
- {
- target = toStringList(enumerator->type());
- }
- else
- {
- target = getContainer(p);
- }
+ if(enumerator)
+ {
+ target = toStringList(enumerator->type());
+ }
+ else
+ {
+ target = getContainer(p);
+ }
path = "";
while (!target.empty()) {
if (!path.empty()) {
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 14d6acad2a0..3e526d761ff 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -40,7 +40,7 @@ void
writeU8Buffer(const vector<unsigned char>& u8buffer, ::IceUtilInternal::Output& out)
{
vector<unsigned short> u16buffer = toUTF16(u8buffer);
-
+
for(vector<unsigned short>::const_iterator c = u16buffer.begin(); c != u16buffer.end(); ++c)
{
out << u16CodePoint(*c);
@@ -2979,7 +2979,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
out << "class " << fixKwd(name);
out.useCurrentPosAsIndent();
- StringList implements;
+ StringList implements;
bool implementsOnNewLine = true;
if(bases.empty() || bases.front()->isInterface())
@@ -2987,7 +2987,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
if(p->isLocal())
{
implementsOnNewLine = false;
- implements.push_back("java.lang.Cloneable");
+ implements.push_back("java.lang.Cloneable");
}
else
{
@@ -3343,28 +3343,28 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
if(!p->isInterface())
{
- out << sp << nl << "public " << name << nl << "clone()";
- out << sb;
-
- if(p->isLocal() && !baseClass)
- {
- out << nl << name << " c = null;";
- out << nl << "try";
- out << sb;
- out << nl << "c = (" << name << ")super.clone();";
- out << eb;
- out << nl << "catch(CloneNotSupportedException ex)";
- out << sb;
- out << nl << "assert false; // impossible";
- out << eb;
- out << nl << "return c;";
-
- }
- else
- {
- out << nl << "return (" << name << ")super.clone();";
- }
- out << eb;
+ out << sp << nl << "public " << name << nl << "clone()";
+ out << sb;
+
+ if(p->isLocal() && !baseClass)
+ {
+ out << nl << name << " c = null;";
+ out << nl << "try";
+ out << sb;
+ out << nl << "c = (" << name << ")super.clone();";
+ out << eb;
+ out << nl << "catch(CloneNotSupportedException ex)";
+ out << sb;
+ out << nl << "assert false; // impossible";
+ out << eb;
+ out << nl << "return c;";
+
+ }
+ else
+ {
+ out << nl << "return (" << name << ")super.clone();";
+ }
+ out << eb;
}
if(p->isInterface() && !p->isLocal())
@@ -3775,7 +3775,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(p->usesClasses(false))
{
- if(!base || (base && !base->usesClasses(false)))
+ if(!base || (base && !base->usesClasses(false)))
{
out << sp << nl << "public boolean" << nl << "__usesClasses()";
out << sb;
diff --git a/cpp/test/Ice/hold/AllTests.cpp b/cpp/test/Ice/hold/AllTests.cpp
index 8c32502e43c..789562c8d1f 100644
--- a/cpp/test/Ice/hold/AllTests.cpp
+++ b/cpp/test/Ice/hold/AllTests.cpp
@@ -209,7 +209,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
while(value < 3000 && cond->value())
{
completed = make_shared<promise<void>>();
- auto sent = make_shared<promise<bool>>();
+ auto sent = make_shared<promise<bool>>();
auto expected = value;
holdSerialized->setAsync(
value + 1,
diff --git a/cpp/test/Ice/operations/Client.cpp b/cpp/test/Ice/operations/Client.cpp
index a000b049a77..65d65d35701 100644
--- a/cpp/test/Ice/operations/Client.cpp
+++ b/cpp/test/Ice/operations/Client.cpp
@@ -17,7 +17,7 @@ using namespace std;
int
run(int, char**, const Ice::CommunicatorPtr& communicator, bool remote)
-{
+{
Test::MyClassPrxPtr allTests(const Ice::CommunicatorPtr&);
Test::MyClassPrxPtr myClass = allTests(communicator);
@@ -67,7 +67,7 @@ main(int argc, char* argv[])
initData.properties = Ice::createProperties(argc, argv);
initData.properties->setProperty("Ice.ThreadPool.Client.Size", "2");
initData.properties->setProperty("Ice.ThreadPool.Client.SizeWarn", "0");
- initData.properties->setProperty("Ice.BatchAutoFlushSize", "100");
+ initData.properties->setProperty("Ice.BatchAutoFlushSize", "100");
Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData);
RemoteConfig rc("Ice/operations", argc, argv, ich.communicator());
diff --git a/cpp/test/Ice/stringConverter/Client.cpp b/cpp/test/Ice/stringConverter/Client.cpp
index c9fb040ef01..6593f7f818f 100644
--- a/cpp/test/Ice/stringConverter/Client.cpp
+++ b/cpp/test/Ice/stringConverter/Client.cpp
@@ -61,14 +61,14 @@ main(int argc, char* argv[])
IceUtil::setProcessStringConverter(IceUtil::createIconvStringConverter<char>("iso815"));
}
IceUtil::setProcessWstringConverter(IceUtil::createIconvStringConverter<wchar_t>("ucs4"));
-
+
#elif defined(_AIX)
-
+
// Always big-endian
-
+
if(useLocale)
{
- IceUtil::setProcessStringConverter(IceUtil::createIconvStringConverter<char>());
+ IceUtil::setProcessStringConverter(IceUtil::createIconvStringConverter<char>());
}
else
{
@@ -77,12 +77,12 @@ main(int argc, char* argv[])
if(sizeof(wchar_t) == 4)
{
- IceUtil::setProcessWstringConverter(IceUtil::createIconvStringConverter<wchar_t>("UTF-32"));
+ IceUtil::setProcessWstringConverter(IceUtil::createIconvStringConverter<wchar_t>("UTF-32"));
}
else
- {
- IceUtil::setProcessWstringConverter(IceUtil::createIconvStringConverter<wchar_t>("UTF-16"));
- }
+ {
+ IceUtil::setProcessWstringConverter(IceUtil::createIconvStringConverter<wchar_t>("UTF-16"));
+ }
#else
if(useLocale)
diff --git a/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp b/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp
index 6172e9e689e..a3bcc7ff1e3 100644
--- a/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp
+++ b/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp
@@ -23,7 +23,7 @@ class RegistryPluginI : public Ice::Plugin
public:
RegistryPluginI(const Ice::CommunicatorPtr&);
-
+
virtual void initialize();
virtual void destroy();
@@ -40,7 +40,7 @@ public:
{
}
- virtual Ice::StringSeq
+ virtual Ice::StringSeq
filter(const string& id, const Ice::StringSeq& adpts, const Ice::ConnectionPtr&, const Ice::Context& ctx)
{
if(_testFacade)
@@ -52,9 +52,9 @@ public:
{
test(_facade->getApplicationInfo(_facade->getAdapterApplication(*p)).descriptor.name == "Test");
test(_facade->getServerInfo(_facade->getAdapterServer(*p)).application == "Test");
- test(_facade->getNodeInfo(_facade->getAdapterNode(*p)).name == "localnode");
+ test(_facade->getNodeInfo(_facade->getAdapterNode(*p)).name == "localnode");
#ifndef _AIX
- // On AIX, icegridnode needs read permissions on /dev/kmem
+ // On AIX, icegridnode needs read permissions on /dev/kmem
test(_facade->getNodeLoad(_facade->getAdapterNode(*p)).avg1 >= 0.0);
#endif
test(_facade->getAdapterInfo(*p)[0].replicaGroupId == id);
@@ -98,9 +98,9 @@ public:
TypeFilterI(const RegistryPluginFacadePtr& facade) : _facade(facade)
{
- }
+ }
- virtual Ice::ObjectProxySeq
+ virtual Ice::ObjectProxySeq
filter(const string& type, const Ice::ObjectProxySeq& objects, const Ice::ConnectionPtr&, const Ice::Context& ctx)
{
Ice::Context::const_iterator p = ctx.find("server");
@@ -130,12 +130,12 @@ class ExcludeReplicaGroupFilterI : public IceGrid::ReplicaGroupFilter
{
public:
- ExcludeReplicaGroupFilterI(const RegistryPluginFacadePtr& facade, const string& exclude) :
+ ExcludeReplicaGroupFilterI(const RegistryPluginFacadePtr& facade, const string& exclude) :
_facade(facade), _exclude(exclude)
{
}
- virtual Ice::StringSeq
+ virtual Ice::StringSeq
filter(const string& id, const Ice::StringSeq& adapters, const Ice::ConnectionPtr& con, const Ice::Context& ctx)
{
Ice::Context::const_iterator p = ctx.find("server");
diff --git a/cpp/test/IceSSL/configuration/AllTests.cpp b/cpp/test/IceSSL/configuration/AllTests.cpp
index f903f220c4a..a2155a1ea2d 100644
--- a/cpp/test/IceSSL/configuration/AllTests.cpp
+++ b/cpp/test/IceSSL/configuration/AllTests.cpp
@@ -1533,7 +1533,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir, bool p12)
// }
// catch(const LocalException& ex)
// {
- // test(false);
+ // test(false);
// }
// fact->destroyServer(server);
// comm->destroy();
diff --git a/cpp/test/uwp/MainPage.xaml.cpp b/cpp/test/uwp/MainPage.xaml.cpp
index 5561f5b25c1..75a6b07381c 100644
--- a/cpp/test/uwp/MainPage.xaml.cpp
+++ b/cpp/test/uwp/MainPage.xaml.cpp
@@ -112,14 +112,14 @@ vector<TestCasePtr> allTest(bool remoteserver)
TestCasePtr test;
TestConfigurationPtr configuration;
- test.reset(new TestCase("Ice", "acm", "client.dll", "server.dll"));
- all.push_back(test);
+ test.reset(new TestCase("Ice", "acm", "client.dll", "server.dll"));
+ all.push_back(test);
test.reset(new TestCase("Ice", "adapterDeactivation", "client.dll", "server.dll", "", "collocated.dll"));
all.push_back(test);
- test.reset(new TestCase("Ice", "admin", "client.dll", "server.dll"));
- all.push_back(test);
+ test.reset(new TestCase("Ice", "admin", "client.dll", "server.dll"));
+ all.push_back(test);
test.reset(new TestCase("Ice", "ami", "client.dll", "server.dll", "", "collocated.dll"));
all.push_back(test);
@@ -130,10 +130,10 @@ vector<TestCasePtr> allTest(bool remoteserver)
test.reset(new TestCase("Ice", "dispatcher", "client.dll", "server.dll", "", "collocated.dll"));
all.push_back(test);
- test.reset(new TestCase("Ice", "enums", "client.dll", "server.dll"));
- addConfiguration(test, "1.0 encoding", "1.0", false, { "--Ice.Default.EncodingVersion=1.0" });
- addConfiguration(test, "1.1 encoding", "1.1", false);
- all.push_back(test);
+ test.reset(new TestCase("Ice", "enums", "client.dll", "server.dll"));
+ addConfiguration(test, "1.0 encoding", "1.0", false, { "--Ice.Default.EncodingVersion=1.0" });
+ addConfiguration(test, "1.1 encoding", "1.1", false);
+ all.push_back(test);
test.reset(new TestCase("Ice", "exceptions", "client.dll", "server.dll", "serveramd.dll", "collocated.dll"));
addConfiguration(test, "compact (default) format", "compact", false);
@@ -147,8 +147,8 @@ vector<TestCasePtr> allTest(bool remoteserver)
test.reset(new TestCase("Ice", "facets", "client.dll", "server.dll", "", "collocated.dll"));
all.push_back(test);
- test.reset(new TestCase("Ice", "hash", "client.dll"));
- all.push_back(test);
+ test.reset(new TestCase("Ice", "hash", "client.dll"));
+ all.push_back(test);
test.reset(new TestCase("Ice", "hold", "client.dll", "server.dll"));
all.push_back(test);
@@ -169,11 +169,11 @@ vector<TestCasePtr> allTest(bool remoteserver)
test.reset(new TestCase("Ice", "location", "client.dll", "server.dll"));
all.push_back(test);
- if (!remoteserver)
- {
- test.reset(new TestCase("Ice", "metrics", "client.dll", "server.dll", "serveramd.dll"));
- all.push_back(test);
- }
+ if (!remoteserver)
+ {
+ test.reset(new TestCase("Ice", "metrics", "client.dll", "server.dll", "serveramd.dll"));
+ all.push_back(test);
+ }
test.reset(new TestCase("Ice", "objects", "client.dll", "server.dll", "", "collocated.dll"));
addConfiguration(test, "compact (default) format", "compact", false);
@@ -188,11 +188,11 @@ vector<TestCasePtr> allTest(bool remoteserver)
addConfiguration(test, "AMD TIE server", "", true, {}, { "java", "csharp" });
all.push_back(test);
- test.reset(new TestCase("Ice", "optional", "client.dll", "server.dll"));
- addConfiguration(test, "compact (default) format", "compact", false);
- addConfiguration(test, "sliced format", "sliced", false, { "--Ice.Default.SlicedFormat" });
- addConfiguration(test, "AMD server", "", true);
- all.push_back(test);
+ test.reset(new TestCase("Ice", "optional", "client.dll", "server.dll"));
+ addConfiguration(test, "compact (default) format", "compact", false);
+ addConfiguration(test, "sliced format", "sliced", false, { "--Ice.Default.SlicedFormat" });
+ addConfiguration(test, "AMD server", "", true);
+ all.push_back(test);
test.reset(new TestCase("Ice", "proxy", "client.dll", "server.dll", "serveramd.dll", "collocated.dll"));
addConfiguration(test, "regular server", "", false);
@@ -644,7 +644,7 @@ createProxy(const string id, TestConfig config)
void
TestRunner::runClientServerTestWithRemoteServer(const string& client)
{
- ControllerPrxPtr controller = ICE_UNCHECKED_CAST(ControllerPrx,
+ ControllerPrxPtr controller = ICE_UNCHECKED_CAST(ControllerPrx,
_communicator->stringToProxy(createProxy("controller", _config)));
StringSeq options;
if(_config.serialize)
@@ -778,7 +778,7 @@ DllCache::loadDll(const std::string& name)
}
HINSTANCE hnd = LoadPackagedLibrary(IceUtil::stringToWstring(name).c_str(), 0);
_dlls.insert(make_pair(name, hnd));
-
+
return hnd;
}
@@ -796,7 +796,7 @@ MainPage::MainPage() :
_messages(ref new Vector<String^>())
{
InitializeComponent();
- Ice::registerIceSSL();
+ Ice::registerIceSSL();
}
void
diff --git a/cpp/test/uwp/MainPage.xaml.h b/cpp/test/uwp/MainPage.xaml.h
index 39fd50b2a2a..cfce3dfcd93 100644
--- a/cpp/test/uwp/MainPage.xaml.h
+++ b/cpp/test/uwp/MainPage.xaml.h
@@ -85,7 +85,7 @@ public:
~DllCache();
- HINSTANCE loadDll(const std::string&);
+ HINSTANCE loadDll(const std::string&);
private:
@@ -101,7 +101,7 @@ public:
void completed();
void failed(Platform::String^ reason);
- void printToConsoleOutput(Platform::String^ message, bool newline);
+ void printToConsoleOutput(Platform::String^ message, bool newline);
protected: