diff options
author | Bernard Normier <bernard@zeroc.com> | 2012-10-23 16:19:38 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2012-10-23 16:19:38 -0400 |
commit | ada25bad3511a359eb28cf48f018d6a42e166f10 (patch) | |
tree | 430749f887a1c6f708c2d4a23b3e3ec4ef18ef2c /cpp | |
parent | Ruby 1.8 fix (diff) | |
download | ice-ada25bad3511a359eb28cf48f018d6a42e166f10.tar.bz2 ice-ada25bad3511a359eb28cf48f018d6a42e166f10.tar.xz ice-ada25bad3511a359eb28cf48f018d6a42e166f10.zip |
Fixed ICE-4855: expand tabs to space (8) for .php, .cpp, .h, .java and .cs files
Diffstat (limited to 'cpp')
107 files changed, 780 insertions, 780 deletions
diff --git a/cpp/demo/Freeze/customEvictor/Client.cpp b/cpp/demo/Freeze/customEvictor/Client.cpp index 5536358bc01..e340aec325f 100644 --- a/cpp/demo/Freeze/customEvictor/Client.cpp +++ b/cpp/demo/Freeze/customEvictor/Client.cpp @@ -198,7 +198,7 @@ WarehouseClient::run(int argc, char* argv[]) if(rpt > 0) { cout << "Reader " << i << ": " << rpt << " requests per second (" << 1000.0 / rpt - << " ms per request)" << endl; + << " ms per request)" << endl; } } diff --git a/cpp/demo/Glacier2/winrt/chat/App.xaml.cpp b/cpp/demo/Glacier2/winrt/chat/App.xaml.cpp index 826dbb0322a..b8da2c53a10 100644 --- a/cpp/demo/Glacier2/winrt/chat/App.xaml.cpp +++ b/cpp/demo/Glacier2/winrt/chat/App.xaml.cpp @@ -34,8 +34,8 @@ using namespace Windows::UI::Xaml::Navigation; /// </summary>
App::App()
{
- InitializeComponent();
- Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
+ InitializeComponent();
+ Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
}
/// <summary>
@@ -46,29 +46,29 @@ App::App() /// <param name="pArgs">Details about the launch request and process.</param>
void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs)
{
- // Do not repeat app initialization when already running, just ensure that
- // the window is active
- if (pArgs->PreviousExecutionState == ApplicationExecutionState::Running)
- {
- Window::Current->Activate();
- return;
- }
+ // Do not repeat app initialization when already running, just ensure that
+ // the window is active
+ if (pArgs->PreviousExecutionState == ApplicationExecutionState::Running)
+ {
+ Window::Current->Activate();
+ return;
+ }
- if (pArgs->PreviousExecutionState == ApplicationExecutionState::Terminated)
- {
- //TODO: Load state from previously suspended application
- }
+ if (pArgs->PreviousExecutionState == ApplicationExecutionState::Terminated)
+ {
+ //TODO: Load state from previously suspended application
+ }
- // Create a Frame to act navigation context and navigate to the first page
- auto rootFrame = ref new Frame();
- if (!rootFrame->Navigate(TypeName(MainPage::typeid)))
- {
- throw ref new FailureException("Failed to create initial page");
- }
+ // Create a Frame to act navigation context and navigate to the first page
+ auto rootFrame = ref new Frame();
+ if (!rootFrame->Navigate(TypeName(MainPage::typeid)))
+ {
+ throw ref new FailureException("Failed to create initial page");
+ }
- // Place the frame in the current Window and ensure that it is active
- Window::Current->Content = rootFrame;
- Window::Current->Activate();
+ // Place the frame in the current Window and ensure that it is active
+ Window::Current->Content = rootFrame;
+ Window::Current->Activate();
}
/// <summary>
@@ -80,8 +80,8 @@ void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEvent /// <param name="e">Details about the suspend request.</param>
void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
{
- (void) sender; // Unused parameter
- (void) e; // Unused parameter
+ (void) sender; // Unused parameter
+ (void) e; // Unused parameter
- //TODO: Save application state and stop any background activity
+ //TODO: Save application state and stop any background activity
}
diff --git a/cpp/demo/Glacier2/winrt/chat/App.xaml.h b/cpp/demo/Glacier2/winrt/chat/App.xaml.h index b1b6a271204..c70a3a6bdea 100644 --- a/cpp/demo/Glacier2/winrt/chat/App.xaml.h +++ b/cpp/demo/Glacier2/winrt/chat/App.xaml.h @@ -13,16 +13,16 @@ namespace chat
{
- /// <summary>
- /// Provides application-specific behavior to supplement the default Application class.
- /// </summary>
- ref class App sealed
- {
- public:
- App();
- virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
+ /// <summary>
+ /// Provides application-specific behavior to supplement the default Application class.
+ /// </summary>
+ ref class App sealed
+ {
+ public:
+ App();
+ virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
- private:
- void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
- };
+ private:
+ void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
+ };
}
diff --git a/cpp/demo/Ice/MFC/client/Resource.h b/cpp/demo/Ice/MFC/client/Resource.h index b35407d15ec..b35407d15ec 100755..100644 --- a/cpp/demo/Ice/MFC/client/Resource.h +++ b/cpp/demo/Ice/MFC/client/Resource.h diff --git a/cpp/demo/Ice/MFC/client/stdafx.cpp b/cpp/demo/Ice/MFC/client/stdafx.cpp index c751b964f14..c751b964f14 100755..100644 --- a/cpp/demo/Ice/MFC/client/stdafx.cpp +++ b/cpp/demo/Ice/MFC/client/stdafx.cpp diff --git a/cpp/demo/Ice/MFC/client/stdafx.h b/cpp/demo/Ice/MFC/client/stdafx.h index c7ab72d2085..c7ab72d2085 100755..100644 --- a/cpp/demo/Ice/MFC/client/stdafx.h +++ b/cpp/demo/Ice/MFC/client/stdafx.h diff --git a/cpp/demo/Ice/MFC/server/stdafx.h b/cpp/demo/Ice/MFC/server/stdafx.h index 89b2b07356d..89b2b07356d 100755..100644 --- a/cpp/demo/Ice/MFC/server/stdafx.h +++ b/cpp/demo/Ice/MFC/server/stdafx.h diff --git a/cpp/demo/Ice/interleaved/Client.cpp b/cpp/demo/Ice/interleaved/Client.cpp index a0ee3558e35..a0ee3558e35 100755..100644 --- a/cpp/demo/Ice/interleaved/Client.cpp +++ b/cpp/demo/Ice/interleaved/Client.cpp diff --git a/cpp/demo/Ice/interleaved/Server.cpp b/cpp/demo/Ice/interleaved/Server.cpp index ff698bd9b13..ff698bd9b13 100755..100644 --- a/cpp/demo/Ice/interleaved/Server.cpp +++ b/cpp/demo/Ice/interleaved/Server.cpp diff --git a/cpp/demo/Ice/interleaved/ThroughputI.cpp b/cpp/demo/Ice/interleaved/ThroughputI.cpp index 04545b73a1d..04545b73a1d 100755..100644 --- a/cpp/demo/Ice/interleaved/ThroughputI.cpp +++ b/cpp/demo/Ice/interleaved/ThroughputI.cpp diff --git a/cpp/demo/Ice/interleaved/ThroughputI.h b/cpp/demo/Ice/interleaved/ThroughputI.h index 2a3bde43aad..2a3bde43aad 100755..100644 --- a/cpp/demo/Ice/interleaved/ThroughputI.h +++ b/cpp/demo/Ice/interleaved/ThroughputI.h diff --git a/cpp/demo/Ice/nrvo/Client.cpp b/cpp/demo/Ice/nrvo/Client.cpp index bf17631e4bc..85dfe568643 100644 --- a/cpp/demo/Ice/nrvo/Client.cpp +++ b/cpp/demo/Ice/nrvo/Client.cpp @@ -69,59 +69,59 @@ NrvoClient::run(int argc, char* argv[]) cout << "==> "; cin >> c; - switch(c) - { - case '1': - { - cout << "calling op1" << endl; - MyStringSeq seq = nrvo->op1(); - break; - } - - case '2': - { - cout << "calling op2" << endl; - MyStringSeq seq = nrvo->op2(); - break; - } - - case '3': - { - cout << "calling op3(10)" << endl; - MyStringSeq seq = nrvo->op3(10); - break; - } - - case '4': - { - cout << "calling op3(0)" << endl; - MyStringSeq seq = nrvo->op3(0); - break; - } - - case 's': - { - nrvo->shutdown(); - break; - } - - case '?': - { - menu(); - break; - } - - case 'x': - { - break; - } - default: - { - cout << "unknown command `" << c << "'" << endl; - menu(); - break; - } - } + switch(c) + { + case '1': + { + cout << "calling op1" << endl; + MyStringSeq seq = nrvo->op1(); + break; + } + + case '2': + { + cout << "calling op2" << endl; + MyStringSeq seq = nrvo->op2(); + break; + } + + case '3': + { + cout << "calling op3(10)" << endl; + MyStringSeq seq = nrvo->op3(10); + break; + } + + case '4': + { + cout << "calling op3(0)" << endl; + MyStringSeq seq = nrvo->op3(0); + break; + } + + case 's': + { + nrvo->shutdown(); + break; + } + + case '?': + { + menu(); + break; + } + + case 'x': + { + break; + } + default: + { + cout << "unknown command `" << c << "'" << endl; + menu(); + break; + } + } } catch(const Ice::Exception& ex) { diff --git a/cpp/demo/Ice/nrvo/NrvoI.cpp b/cpp/demo/Ice/nrvo/NrvoI.cpp index 12052190d77..e7a27badf04 100644 --- a/cpp/demo/Ice/nrvo/NrvoI.cpp +++ b/cpp/demo/Ice/nrvo/NrvoI.cpp @@ -54,9 +54,9 @@ NrvoI::op3(int size, const Ice::Current&) if(size < 10) { // - // RVO (Return Value Optimization): return value - // is constructed in place. - // + // RVO (Return Value Optimization): return value + // is constructed in place. + // return MyStringSeq(size, "hello"); } diff --git a/cpp/demo/Ice/winrt/bidir/App.xaml.cpp b/cpp/demo/Ice/winrt/bidir/App.xaml.cpp index d3b64f4d024..e3354db363e 100644 --- a/cpp/demo/Ice/winrt/bidir/App.xaml.cpp +++ b/cpp/demo/Ice/winrt/bidir/App.xaml.cpp @@ -35,8 +35,8 @@ using namespace Windows::UI::Xaml::Navigation; /// </summary>
App::App()
{
- InitializeComponent();
- Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
+ InitializeComponent();
+ Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
}
/// <summary>
@@ -47,29 +47,29 @@ App::App() /// <param name="pArgs">Details about the launch request and process.</param>
void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs)
{
- // Do not repeat app initialization when already running, just ensure that
- // the window is active
- if (pArgs->PreviousExecutionState == ApplicationExecutionState::Running)
- {
- Window::Current->Activate();
- return;
- }
+ // Do not repeat app initialization when already running, just ensure that
+ // the window is active
+ if (pArgs->PreviousExecutionState == ApplicationExecutionState::Running)
+ {
+ Window::Current->Activate();
+ return;
+ }
- if (pArgs->PreviousExecutionState == ApplicationExecutionState::Terminated)
- {
- //TODO: Load state from previously suspended application
- }
+ if (pArgs->PreviousExecutionState == ApplicationExecutionState::Terminated)
+ {
+ //TODO: Load state from previously suspended application
+ }
- // Create a Frame to act navigation context and navigate to the first page
- auto rootFrame = ref new Frame();
- if (!rootFrame->Navigate(TypeName(MainPage::typeid)))
- {
- throw ref new FailureException("Failed to create initial page");
- }
+ // Create a Frame to act navigation context and navigate to the first page
+ auto rootFrame = ref new Frame();
+ if (!rootFrame->Navigate(TypeName(MainPage::typeid)))
+ {
+ throw ref new FailureException("Failed to create initial page");
+ }
- // Place the frame in the current Window and ensure that it is active
- Window::Current->Content = rootFrame;
- Window::Current->Activate();
+ // Place the frame in the current Window and ensure that it is active
+ Window::Current->Content = rootFrame;
+ Window::Current->Activate();
}
/// <summary>
@@ -81,8 +81,8 @@ void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEvent /// <param name="e">Details about the suspend request.</param>
void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
{
- (void) sender; // Unused parameter
- (void) e; // Unused parameter
+ (void) sender; // Unused parameter
+ (void) e; // Unused parameter
- //TODO: Save application state and stop any background activity
+ //TODO: Save application state and stop any background activity
}
diff --git a/cpp/demo/Ice/winrt/bidir/App.xaml.h b/cpp/demo/Ice/winrt/bidir/App.xaml.h index 103a440e38e..5bbde84a051 100644 --- a/cpp/demo/Ice/winrt/bidir/App.xaml.h +++ b/cpp/demo/Ice/winrt/bidir/App.xaml.h @@ -13,16 +13,16 @@ namespace bidir
{
- /// <summary>
- /// Provides application-specific behavior to supplement the default Application class.
- /// </summary>
- ref class App sealed
- {
- public:
- App();
- virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
+ /// <summary>
+ /// Provides application-specific behavior to supplement the default Application class.
+ /// </summary>
+ ref class App sealed
+ {
+ public:
+ App();
+ virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
- private:
- void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
- };
+ private:
+ void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
+ };
}
diff --git a/cpp/demo/Ice/winrt/hello/App.xaml.cpp b/cpp/demo/Ice/winrt/hello/App.xaml.cpp index dd08ad621d1..a16d9293f9c 100644 --- a/cpp/demo/Ice/winrt/hello/App.xaml.cpp +++ b/cpp/demo/Ice/winrt/hello/App.xaml.cpp @@ -34,8 +34,8 @@ using namespace Windows::UI::Xaml::Navigation; /// </summary>
App::App()
{
- InitializeComponent();
- Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
+ InitializeComponent();
+ Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
}
/// <summary>
@@ -46,29 +46,29 @@ App::App() /// <param name="pArgs">Details about the launch request and process.</param>
void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs)
{
- // Do not repeat app initialization when already running, just ensure that
- // the window is active
- if (pArgs->PreviousExecutionState == ApplicationExecutionState::Running)
- {
- Window::Current->Activate();
- return;
- }
+ // Do not repeat app initialization when already running, just ensure that
+ // the window is active
+ if (pArgs->PreviousExecutionState == ApplicationExecutionState::Running)
+ {
+ Window::Current->Activate();
+ return;
+ }
- if (pArgs->PreviousExecutionState == ApplicationExecutionState::Terminated)
- {
- //TODO: Load state from previously suspended application
- }
+ if (pArgs->PreviousExecutionState == ApplicationExecutionState::Terminated)
+ {
+ //TODO: Load state from previously suspended application
+ }
- // Create a Frame to act navigation context and navigate to the first page
- auto rootFrame = ref new Frame();
- if (!rootFrame->Navigate(TypeName(MainPage::typeid)))
- {
- throw ref new FailureException("Failed to create initial page");
- }
+ // Create a Frame to act navigation context and navigate to the first page
+ auto rootFrame = ref new Frame();
+ if (!rootFrame->Navigate(TypeName(MainPage::typeid)))
+ {
+ throw ref new FailureException("Failed to create initial page");
+ }
- // Place the frame in the current Window and ensure that it is active
- Window::Current->Content = rootFrame;
- Window::Current->Activate();
+ // Place the frame in the current Window and ensure that it is active
+ Window::Current->Content = rootFrame;
+ Window::Current->Activate();
}
/// <summary>
@@ -80,8 +80,8 @@ void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEvent /// <param name="e">Details about the suspend request.</param>
void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
{
- (void) sender; // Unused parameter
- (void) e; // Unused parameter
+ (void) sender; // Unused parameter
+ (void) e; // Unused parameter
- //TODO: Save application state and stop any background activity
+ //TODO: Save application state and stop any background activity
}
diff --git a/cpp/demo/Ice/winrt/hello/App.xaml.h b/cpp/demo/Ice/winrt/hello/App.xaml.h index 51301b382f9..28cc4a53cee 100644 --- a/cpp/demo/Ice/winrt/hello/App.xaml.h +++ b/cpp/demo/Ice/winrt/hello/App.xaml.h @@ -9,16 +9,16 @@ namespace hello
{
- /// <summary>
- /// Provides application-specific behavior to supplement the default Application class.
- /// </summary>
- ref class App sealed
- {
- public:
- App();
- virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
+ /// <summary>
+ /// Provides application-specific behavior to supplement the default Application class.
+ /// </summary>
+ ref class App sealed
+ {
+ public:
+ App();
+ virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
- private:
- void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
- };
+ private:
+ void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
+ };
}
diff --git a/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp b/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp index 0200271a19c..0f088cadf3a 100644 --- a/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp +++ b/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp @@ -25,7 +25,7 @@ getBasename(const string& path) string::size_type pos = path.rfind('/'); if(pos == string::npos) { - pos = path.rfind('\\'); + pos = path.rfind('\\'); } if(pos == string::npos) diff --git a/cpp/demo/IcePatch2/MFC/stdafx.h b/cpp/demo/IcePatch2/MFC/stdafx.h index d9ba470f8fc..d9ba470f8fc 100755..100644 --- a/cpp/demo/IcePatch2/MFC/stdafx.h +++ b/cpp/demo/IcePatch2/MFC/stdafx.h diff --git a/cpp/demo/IceStorm/counter/Server.cpp b/cpp/demo/IceStorm/counter/Server.cpp index 25066097498..3eeeaa8506a 100644 --- a/cpp/demo/IceStorm/counter/Server.cpp +++ b/cpp/demo/IceStorm/counter/Server.cpp @@ -43,7 +43,7 @@ Server::run(int argc, char* argv[]) Ice::PropertiesPtr properties = communicator()->getProperties(); IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::checkedCast( - communicator()->propertyToProxy("TopicManager.Proxy")); + communicator()->propertyToProxy("TopicManager.Proxy")); if(!manager) { cerr << appName() << ": invalid proxy" << endl; diff --git a/cpp/include/Ice/IconvStringConverter.h b/cpp/include/Ice/IconvStringConverter.h index ed197218699..19875a458cb 100644 --- a/cpp/include/Ice/IconvStringConverter.h +++ b/cpp/include/Ice/IconvStringConverter.h @@ -97,7 +97,7 @@ IconvStringConverter<charT>::IconvStringConverter(const char* internalCode) : // try { - close(createDescriptors()); + close(createDescriptors()); } catch(const Ice::StringConversionException& sce) { @@ -122,7 +122,7 @@ IconvStringConverter<charT>::IconvStringConverter(const char* internalCode) : if(rs != 0) { - throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, rs); + throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, rs); } #endif } @@ -144,7 +144,7 @@ IconvStringConverter<charT>::~IconvStringConverter() void* val = pthread_getspecific(_key); if(val != 0) { - cleanupKey(val); + cleanupKey(val); } if(pthread_key_delete(_key) != 0) { @@ -163,20 +163,20 @@ IconvStringConverter<charT>::createDescriptors() const cdp.first = iconv_open(_internalCode.c_str(), externalCode); if(cdp.first == iconv_t(-1)) { - throw Ice::StringConversionException( - __FILE__, __LINE__, - std::string("iconv cannot convert from ") - + externalCode + " to " + _internalCode); + throw Ice::StringConversionException( + __FILE__, __LINE__, + std::string("iconv cannot convert from ") + + externalCode + " to " + _internalCode); } cdp.second = iconv_open(externalCode, _internalCode.c_str()); if(cdp.second == iconv_t(-1)) { - iconv_close(cdp.first); + iconv_close(cdp.first); - throw Ice::StringConversionException( + throw Ice::StringConversionException( __FILE__, __LINE__, - std::string("iconv cannot convert from ") + _internalCode + " to " + externalCode); + std::string("iconv cannot convert from ") + _internalCode + " to " + externalCode); } return cdp; } @@ -191,25 +191,25 @@ IconvStringConverter<charT>::getDescriptors() const #endif if(val != 0) { - return *static_cast<std::pair<iconv_t, iconv_t>*>(val); + return *static_cast<std::pair<iconv_t, iconv_t>*>(val); } else { - std::pair<iconv_t, iconv_t> cdp = createDescriptors(); - + std::pair<iconv_t, iconv_t> cdp = createDescriptors(); + #ifdef _WIN32 if(TlsSetValue(_key, new std::pair<iconv_t, iconv_t>(cdp)) == 0) { throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } #else - int rs = pthread_setspecific(_key, new std::pair<iconv_t, iconv_t>(cdp)); - if(rs != 0) - { - throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, rs); - } + int rs = pthread_setspecific(_key, new std::pair<iconv_t, iconv_t>(cdp)); + if(rs != 0) + { + throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, rs); + } #endif - return cdp; + return cdp; } } @@ -261,9 +261,9 @@ IconvStringConverter<charT>::toUTF8(const charT* sourceStart, const charT* sourc // do { - size_t howMany = std::max(inbytesleft, size_t(4)); - outbuf = reinterpret_cast<char*>(buf.getMoreBytes(howMany, reinterpret_cast<Ice::Byte*>(outbuf))); - count = iconv(cd, &inbuf, &inbytesleft, &outbuf, &howMany); + size_t howMany = std::max(inbytesleft, size_t(4)); + outbuf = reinterpret_cast<char*>(buf.getMoreBytes(howMany, reinterpret_cast<Ice::Byte*>(outbuf))); + count = iconv(cd, &inbuf, &inbytesleft, &outbuf, &howMany); #ifdef ICE_NO_ERRNO } while(count == size_t(-1)); #else @@ -279,14 +279,14 @@ IconvStringConverter<charT>::toUTF8(const charT* sourceStart, const charT* sourc msg = strerror(errno); } #endif - throw Ice::StringConversionException(__FILE__, __LINE__, msg); + throw Ice::StringConversionException(__FILE__, __LINE__, msg); } return reinterpret_cast<Ice::Byte*>(outbuf); } template<typename charT> void IconvStringConverter<charT>::fromUTF8(const Ice::Byte* sourceStart, const Ice::Byte* sourceEnd, - std::basic_string<charT>& target) const + std::basic_string<charT>& target) const { iconv_t cd = getDescriptors().first; @@ -323,24 +323,24 @@ IconvStringConverter<charT>::fromUTF8(const Ice::Byte* sourceStart, const Ice::B // do { - size_t increment = std::max(inbytesleft * sizeof(wchar_t), size_t(8)); - bufsize += increment; - - char* newbuf = static_cast<char*>(realloc(buf, bufsize)); + size_t increment = std::max(inbytesleft * sizeof(wchar_t), size_t(8)); + bufsize += increment; + + char* newbuf = static_cast<char*>(realloc(buf, bufsize)); - if(newbuf == 0) - { - free(buf); - throw Ice::StringConversionException( - __FILE__, __LINE__, "Out of memory"); - } + if(newbuf == 0) + { + free(buf); + throw Ice::StringConversionException( + __FILE__, __LINE__, "Out of memory"); + } - outbuf = newbuf + (outbuf - buf); - outbytesleft += increment; + outbuf = newbuf + (outbuf - buf); + outbytesleft += increment; buf = newbuf; - - count = iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); + + count = iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); #ifdef ICE_NO_ERRNO } while(count == size_t(-1)); #else @@ -356,8 +356,8 @@ IconvStringConverter<charT>::fromUTF8(const Ice::Byte* sourceStart, const Ice::B msg = strerror(errno); } #endif - free(buf); - throw Ice::StringConversionException(__FILE__, __LINE__, msg); + free(buf); + throw Ice::StringConversionException(__FILE__, __LINE__, msg); } size_t length = (bufsize - outbytesleft) / sizeof(charT); diff --git a/cpp/include/Ice/OutgoingAsync.h b/cpp/include/Ice/OutgoingAsync.h index 2bbc4b5a2d4..f142c51df71 100644 --- a/cpp/include/Ice/OutgoingAsync.h +++ b/cpp/include/Ice/OutgoingAsync.h @@ -78,7 +78,7 @@ public: LocalObjectPtr getCookie() const { - return _cookie; // No lock needed, cookie is immutable + return _cookie; // No lock needed, cookie is immutable } const std::string& getOperation() const @@ -409,10 +409,10 @@ public: virtual void __sent(const ::Ice::AsyncResultPtr& result) const { - if(sent) - { - (callback.get()->*sent)(result); - } + if(sent) + { + (callback.get()->*sent)(result); + } } virtual bool __hasSentCallback() const diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h index 75986833330..e9bc558a0ea 100644 --- a/cpp/include/Ice/Proxy.h +++ b/cpp/include/Ice/Proxy.h @@ -302,7 +302,7 @@ public: ::Ice::AsyncResultPtr begin_ice_isA(const ::std::string& typeId, const ::Ice::CallbackPtr& __del, - const ::Ice::LocalObjectPtr& __cookie = 0) + const ::Ice::LocalObjectPtr& __cookie = 0) { return begin_ice_isA(typeId, 0, __del, __cookie); } @@ -310,14 +310,14 @@ public: ::Ice::AsyncResultPtr begin_ice_isA(const ::std::string& typeId, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, - const ::Ice::LocalObjectPtr& __cookie = 0) + const ::Ice::LocalObjectPtr& __cookie = 0) { return begin_ice_isA(typeId, &__ctx, __del, __cookie); } ::Ice::AsyncResultPtr begin_ice_isA(const ::std::string& typeId, const ::Ice::Callback_Object_ice_isAPtr& __del, - const ::Ice::LocalObjectPtr& __cookie = 0) + const ::Ice::LocalObjectPtr& __cookie = 0) { return begin_ice_isA(typeId, 0, __del, __cookie); } @@ -325,7 +325,7 @@ public: ::Ice::AsyncResultPtr begin_ice_isA(const ::std::string& typeId, const ::Ice::Context& __ctx, const ::Ice::Callback_Object_ice_isAPtr& __del, - const ::Ice::LocalObjectPtr& __cookie = 0) + const ::Ice::LocalObjectPtr& __cookie = 0) { return begin_ice_isA(typeId, &__ctx, __del, __cookie); } @@ -481,7 +481,7 @@ public: ::Ice::AsyncResultPtr begin_ice_ids(const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, - const ::Ice::LocalObjectPtr& __cookie = 0) + const ::Ice::LocalObjectPtr& __cookie = 0) { return begin_ice_ids(&__ctx, __del, __cookie); } diff --git a/cpp/include/IceUtil/Cond.h b/cpp/include/IceUtil/Cond.h index 29388ddbeec..3a54e8ab75f 100644 --- a/cpp/include/IceUtil/Cond.h +++ b/cpp/include/IceUtil/Cond.h @@ -242,13 +242,13 @@ Cond::timedWaitImpl(const M& mutex, const Time& timeout) const if(!ok) { - DWORD err = GetLastError(); - - if(err != ERROR_TIMEOUT) - { - throw ThreadSyscallException(__FILE__, __LINE__, err); - } - return false; + DWORD err = GetLastError(); + + if(err != ERROR_TIMEOUT) + { + throw ThreadSyscallException(__FILE__, __LINE__, err); + } + return false; } return true; } diff --git a/cpp/include/IceUtil/Mutex.h b/cpp/include/IceUtil/Mutex.h index 59b1e42d406..abd8ed90b55 100644 --- a/cpp/include/IceUtil/Mutex.h +++ b/cpp/include/IceUtil/Mutex.h @@ -87,7 +87,7 @@ private: struct LockState { # ifdef ICE_HAS_WIN32_CONDVAR - CRITICAL_SECTION* mutex; + CRITICAL_SECTION* mutex; # endif }; #else diff --git a/cpp/include/IceUtil/Shared.h b/cpp/include/IceUtil/Shared.h index 8d843856039..d4c2c29554e 100644 --- a/cpp/include/IceUtil/Shared.h +++ b/cpp/include/IceUtil/Shared.h @@ -21,11 +21,11 @@ // supports sparc (32 and 64 bit). #elif (__GNUC__ >= 4 && __GNUC_MINOR__ >= 1 || __clang__) && \ - ((defined(__sun) && (defined(__sparc) || defined(__sparcv9))) || \ - defined(__APPLE__) || \ - (defined(__linux) && \ - (defined(__i486) || defined(__i586) || \ - defined(__i686) || defined(__x86_64)))) + ((defined(__sun) && (defined(__sparc) || defined(__sparcv9))) || \ + defined(__APPLE__) || \ + (defined(__linux) && \ + (defined(__i486) || defined(__i586) || \ + defined(__i686) || defined(__x86_64)))) # define ICE_HAS_GCC_BUILTINS diff --git a/cpp/src/Freeze/BackgroundSaveEvictorI.cpp b/cpp/src/Freeze/BackgroundSaveEvictorI.cpp index c06b6a660fa..9b889541f3d 100644 --- a/cpp/src/Freeze/BackgroundSaveEvictorI.cpp +++ b/cpp/src/Freeze/BackgroundSaveEvictorI.cpp @@ -301,12 +301,12 @@ Freeze::BackgroundSaveEvictorI::addFacet(const ObjectPtr& servant, const Identit ObjectRecord& rec = element->rec; rec.servant = servant; - if(store->keepStats()) - { - rec.stats.creationTime = IceUtil::Time::now(IceUtil::Time::Monotonic).toMilliSeconds(); - rec.stats.lastSaveTime = 0; - rec.stats.avgSaveTime = 0; - } + if(store->keepStats()) + { + rec.stats.creationTime = IceUtil::Time::now(IceUtil::Time::Monotonic).toMilliSeconds(); + rec.stats.lastSaveTime = 0; + rec.stats.avgSaveTime = 0; + } addToModifiedQueue(element); break; } @@ -1117,7 +1117,7 @@ Freeze::BackgroundSaveEvictorI::run() } Long saveStart = IceUtil::Time::now(IceUtil::Time::Monotonic).toMilliSeconds(); - + try { DbTxn* tx = 0; @@ -1402,11 +1402,11 @@ Freeze::BackgroundSaveEvictorI::stream(const BackgroundSaveEvictorElementPtr& el if(element->status != destroyed) { - bool keepStats = obj.store->keepStats(); - if(keepStats) - { - EvictorIBase::updateStats(element->rec.stats, streamStart); - } + bool keepStats = obj.store->keepStats(); + if(keepStats) + { + EvictorIBase::updateStats(element->rec.stats, streamStart); + } ObjectStoreBase::marshal(element->rec, obj.value, _communicator, _encoding, keepStats); } } diff --git a/cpp/src/Freeze/EvictorI.h b/cpp/src/Freeze/EvictorI.h index c2d5d93aa31..c2d5d93aa31 100755..100644 --- a/cpp/src/Freeze/EvictorI.h +++ b/cpp/src/Freeze/EvictorI.h diff --git a/cpp/src/Freeze/MapI.cpp b/cpp/src/Freeze/MapI.cpp index f59cc04e465..603d9ab35c6 100644 --- a/cpp/src/Freeze/MapI.cpp +++ b/cpp/src/Freeze/MapI.cpp @@ -376,7 +376,7 @@ Freeze::IteratorHelperI::IteratorHelperI(const MapHelperI& m, bool readOnly, #ifdef ICE_CPP11 _tx.reset(new Tx(_map)); #else - _tx = new Tx(_map); + _tx = new Tx(_map); #endif txn = _tx->getTxn(); } @@ -1045,12 +1045,12 @@ Freeze::MapHelperI::~MapHelperI() { try { - close(); + close(); } catch(const DatabaseException& ex) { - Ice::Error error(_connection->getCommunicator()->getLogger()); - error << "Freeze: closing map " << _dbName << " raised: " << ex; + Ice::Error error(_connection->getCommunicator()->getLogger()); + error << "Freeze: closing map " << _dbName << " raised: " << ex; } } @@ -1716,11 +1716,11 @@ Freeze::MapIndexI::~MapIndexI() { try { - _db->close(0); + _db->close(0); } catch(const DbException&) { - // Ignored + // Ignored } } diff --git a/cpp/src/Freeze/MapI.h b/cpp/src/Freeze/MapI.h index f6d3e7ded81..e414d77fc95 100644 --- a/cpp/src/Freeze/MapI.h +++ b/cpp/src/Freeze/MapI.h @@ -67,7 +67,7 @@ public: class Tx #ifndef ICE_CPP11 - : public IceUtil::SimpleShared + : public IceUtil::SimpleShared #endif { public: diff --git a/cpp/src/Freeze/ObjectStore.cpp b/cpp/src/Freeze/ObjectStore.cpp index e8801a1b3c7..44a9fb2b02f 100644 --- a/cpp/src/Freeze/ObjectStore.cpp +++ b/cpp/src/Freeze/ObjectStore.cpp @@ -62,13 +62,13 @@ Freeze::ObjectStoreBase::ObjectStoreBase(const string& facet, const string& face if(p != catalog.end()) { if(p->second.evictor) - { - // - // empty means the value is ::Freeze::ObjectRecord - // - _keepStats = p->second.value.empty(); - } - else + { + // + // empty means the value is ::Freeze::ObjectRecord + // + _keepStats = p->second.value.empty(); + } + else { DatabaseException ex(__FILE__, __LINE__); ex.message = evictor->filename() + " is not an evictor database"; @@ -149,8 +149,8 @@ Freeze::ObjectStoreBase::ObjectStoreBase(const string& facet, const string& face { CatalogData catalogData; catalogData.evictor = true; - catalogData.key = "Ice::Identity"; - catalogData.value = "Object"; + catalogData.key = "Ice::Identity"; + catalogData.value = "Object"; catalog.put(Catalog::value_type(evictor->filename(), catalogData)); } @@ -214,8 +214,8 @@ Freeze::ObjectStoreBase::~ObjectStoreBase() } catch(const DbException& dx) { - Ice::Error error(_communicator->getLogger()); - error << "Freeze: closing ObjectStore " << _dbName << " raised DbException: " << dx.what(); + Ice::Error error(_communicator->getLogger()); + error << "Freeze: closing ObjectStore " << _dbName << " raised DbException: " << dx.what(); } } @@ -358,7 +358,7 @@ Freeze::ObjectStoreBase::marshal(const ObjectRecord& v, Value& bytes, const CommunicatorPtr& communicator, const EncodingVersion& encoding, - bool keepStats) + bool keepStats) { IceInternal::InstancePtr instance = IceInternal::getInstance(communicator); IceInternal::BasicStream stream(instance.get(), encoding, true); @@ -369,7 +369,7 @@ Freeze::ObjectStoreBase::marshal(const ObjectRecord& v, } else { - stream.write(v.servant); + stream.write(v.servant); } stream.writePendingObjects(); @@ -382,7 +382,7 @@ Freeze::ObjectStoreBase::unmarshal(ObjectRecord& v, const Value& bytes, const CommunicatorPtr& communicator, const EncodingVersion& encoding, - bool keepStats) + bool keepStats) { IceInternal::InstancePtr instance = IceInternal::getInstance(communicator); IceInternal::BasicStream stream(instance.get(), encoding, true); @@ -398,7 +398,7 @@ Freeze::ObjectStoreBase::unmarshal(ObjectRecord& v, } else { - stream.read(v.servant); + stream.read(v.servant); } stream.readPendingObjects(); diff --git a/cpp/src/Freeze/TransactionalEvictorContext.cpp b/cpp/src/Freeze/TransactionalEvictorContext.cpp index b2cbf130b80..4ff75ddd128 100644 --- a/cpp/src/Freeze/TransactionalEvictorContext.cpp +++ b/cpp/src/Freeze/TransactionalEvictorContext.cpp @@ -275,11 +275,11 @@ Freeze::TransactionalEvictorContext::ServantHolder::~ServantHolder() ICE_NOEXCEP { if(!_body.readOnly && !_body.removed) { - if(_body.store->keepStats()) - { - EvictorIBase::updateStats(_body.rec.stats, - IceUtil::Time::now(IceUtil::Time::Monotonic).toMilliSeconds()); - } + if(_body.store->keepStats()) + { + EvictorIBase::updateStats(_body.rec.stats, + IceUtil::Time::now(IceUtil::Time::Monotonic).toMilliSeconds()); + } _body.store->update(_body.current->id, _body.rec, ctx->_tx); } diff --git a/cpp/src/Freeze/TransactionalEvictorI.cpp b/cpp/src/Freeze/TransactionalEvictorI.cpp index e24c5006111..c3d641cf00b 100644 --- a/cpp/src/Freeze/TransactionalEvictorI.cpp +++ b/cpp/src/Freeze/TransactionalEvictorI.cpp @@ -150,7 +150,7 @@ Freeze::TransactionalEvictorI::addFacet(const ObjectPtr& servant, const Identity if(store->keepStats()) { - currentTime = IceUtil::Time::now(IceUtil::Time::Monotonic).toMilliSeconds(); + currentTime = IceUtil::Time::now(IceUtil::Time::Monotonic).toMilliSeconds(); } Statistics stats = { currentTime }; @@ -160,7 +160,7 @@ Freeze::TransactionalEvictorI::addFacet(const ObjectPtr& servant, const Identity if(store->keepStats()) { - updateStats(rec.stats, currentTime); + updateStats(rec.stats, currentTime); } if(!store->insert(ident, rec, tx)) @@ -430,7 +430,7 @@ Freeze::TransactionalEvictorI::dispatch(Request& request) if(operationAttributes < 0) { - throw OperationNotExistException(__FILE__, __LINE__); + throw OperationNotExistException(__FILE__, __LINE__); } bool readOnly = (operationAttributes & 0x1) == 0; @@ -477,7 +477,7 @@ Freeze::TransactionalEvictorI::dispatch(Request& request) default: { assert(0); - throw OperationNotExistException(__FILE__, __LINE__); + throw OperationNotExistException(__FILE__, __LINE__); } } diff --git a/cpp/src/FreezeScript/DumpDB.cpp b/cpp/src/FreezeScript/DumpDB.cpp index b2da041ec3d..27aef7b463d 100755..100644 --- a/cpp/src/FreezeScript/DumpDB.cpp +++ b/cpp/src/FreezeScript/DumpDB.cpp @@ -357,8 +357,8 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator if(inputFile.empty()) { const string evictorKeyTypeName = "::Ice::Identity"; - const string oldEvictorValueTypeName = "::Freeze::ObjectRecord"; - const string newEvictorValueTypeName = "Object"; + const string oldEvictorValueTypeName = "::Freeze::ObjectRecord"; + const string newEvictorValueTypeName = "Object"; if((!keyTypeName.empty() && valueTypeName.empty()) || (keyTypeName.empty() && !valueTypeName.empty() && !evictor)) { @@ -388,32 +388,32 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator { evictor = true; } - keyTypeName = p->second.key; - valueTypeName = p->second.value; + keyTypeName = p->second.key; + valueTypeName = p->second.value; - if(evictor && valueTypeName.empty()) - { - valueTypeName = oldEvictorValueTypeName; - } + if(evictor && valueTypeName.empty()) + { + valueTypeName = oldEvictorValueTypeName; + } } } catch(const FreezeScript::FailureException& ex) { - cerr << appName << ": " << ex.reason() << endl; - return EXIT_FAILURE; + cerr << appName << ": " << ex.reason() << endl; + return EXIT_FAILURE; } } if(evictor) { - if(keyTypeName.empty()) - { - keyTypeName = evictorKeyTypeName; - } - if(valueTypeName.empty()) - { - valueTypeName = newEvictorValueTypeName; - } + if(keyTypeName.empty()) + { + keyTypeName = evictorKeyTypeName; + } + if(valueTypeName.empty()) + { + valueTypeName = newEvictorValueTypeName; + } } Slice::TypePtr keyType, valueType; diff --git a/cpp/src/FreezeScript/TransformVisitor.cpp b/cpp/src/FreezeScript/TransformVisitor.cpp index 86dd1a72bd4..4a5d4c6ff98 100755..100644 --- a/cpp/src/FreezeScript/TransformVisitor.cpp +++ b/cpp/src/FreezeScript/TransformVisitor.cpp @@ -529,7 +529,7 @@ FreezeScript::TransformVisitor::transformObject(const ObjectDataPtr& dest, const objectDataMap.erase(p); #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) - objectDataMap.insert(ObjectDataMap::value_type(src.get(), nullptr)); + objectDataMap.insert(ObjectDataMap::value_type(src.get(), nullptr)); #else objectDataMap.insert(ObjectDataMap::value_type(src.get(), 0)); #endif diff --git a/cpp/src/FreezeScript/Transformer.cpp b/cpp/src/FreezeScript/Transformer.cpp index 3d699d65491..3fda2cf467e 100755..100644 --- a/cpp/src/FreezeScript/Transformer.cpp +++ b/cpp/src/FreezeScript/Transformer.cpp @@ -2652,7 +2652,7 @@ FreezeScript::ObjectVisitor::visitObject(const ObjectRefPtr& data) #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) _map.insert(ObjectDataMap::value_type(value.get(), nullptr)); #else - _map.insert(ObjectDataMap::value_type(value.get(), 0)); + _map.insert(ObjectDataMap::value_type(value.get(), 0)); #endif DataMemberMap& members = value->getMembers(); for(DataMemberMap::iterator q = members.begin(); q != members.end(); ++q) diff --git a/cpp/src/FreezeScript/transformdb.cpp b/cpp/src/FreezeScript/transformdb.cpp index f4583394b5c..8de1709ae4a 100755..100644 --- a/cpp/src/FreezeScript/transformdb.cpp +++ b/cpp/src/FreezeScript/transformdb.cpp @@ -490,8 +490,8 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator FreezeScript::TransformAnalyzer analyzer(oldUnit, newUnit, ignoreTypeChanges, out, missingTypes, analyzeErrors); const string evictorKeyName = "::Ice::Identity"; - const string oldEvictorValueName = "::Freeze::ObjectRecord"; - const string newEvictorValueName = "Object"; + const string oldEvictorValueName = "::Freeze::ObjectRecord"; + const string newEvictorValueName = "Object"; if(allDb) { @@ -507,14 +507,14 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator keyName = p->second.key; valueName = p->second.value; - if(keyName.empty()) - { - keyName = evictorKeyName; - } - if(valueName.empty()) - { - valueName = oldEvictorValueName; - } + if(keyName.empty()) + { + keyName = evictorKeyName; + } + if(valueName.empty()) + { + valueName = oldEvictorValueName; + } } else { @@ -544,18 +544,18 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator << "' not found in old Slice definitions" << endl; } - Slice::TypePtr newValueType; - if(p->second.evictor) - { - // - // The new evictor does not keep stats - // - newValueType = findType(newUnit, newEvictorValueName); - } - else - { - newValueType = findType(newUnit, valueName); - } + Slice::TypePtr newValueType; + if(p->second.evictor) + { + // + // The new evictor does not keep stats + // + newValueType = findType(newUnit, newEvictorValueName); + } + else + { + newValueType = findType(newUnit, valueName); + } if(!newValueType) { @@ -576,44 +576,44 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator { return EXIT_FAILURE; } - + analyzer.addDatabase(p->first, oldKeyType, newKeyType, oldValueType, newValueType); } } else { string oldKeyName, newKeyName, oldValueName, newValueName; - - string::size_type pos; - - if(!evictor && (keyTypeNames.empty() || valueTypeNames.empty())) - { - usage(appName); - return EXIT_FAILURE; - } - - if(!keyTypeNames.empty()) - { - pos = keyTypeNames.find(','); - if(pos == 0 || pos == keyTypeNames.size()) - { - usage(appName); - return EXIT_FAILURE; - } - if(pos == string::npos) - { - oldKeyName = keyTypeNames; - newKeyName = keyTypeNames; - } + + string::size_type pos; + + if(!evictor && (keyTypeNames.empty() || valueTypeNames.empty())) + { + usage(appName); + return EXIT_FAILURE; + } + + if(!keyTypeNames.empty()) + { + pos = keyTypeNames.find(','); + if(pos == 0 || pos == keyTypeNames.size()) + { + usage(appName); + return EXIT_FAILURE; + } + if(pos == string::npos) + { + oldKeyName = keyTypeNames; + newKeyName = keyTypeNames; + } else { oldKeyName = keyTypeNames.substr(0, pos); newKeyName = keyTypeNames.substr(pos + 1); } - } + } - if(!valueTypeNames.empty()) - { + if(!valueTypeNames.empty()) + { pos = valueTypeNames.find(','); if(pos == 0 || pos == valueTypeNames.size()) { @@ -631,26 +631,26 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator newValueName = valueTypeNames.substr(pos + 1); } } - - if(evictor) - { - if(oldKeyName.empty()) - { - oldKeyName = evictorKeyName; - } - if(newKeyName.empty()) - { - newKeyName = evictorKeyName; - } - if(oldValueName.empty()) - { - oldValueName = newEvictorValueName; - } - if(newValueName.empty()) - { - newValueName = newEvictorValueName; - } - } + + if(evictor) + { + if(oldKeyName.empty()) + { + oldKeyName = evictorKeyName; + } + if(newKeyName.empty()) + { + newKeyName = evictorKeyName; + } + if(oldValueName.empty()) + { + oldValueName = newEvictorValueName; + } + if(newValueName.empty()) + { + newValueName = newEvictorValueName; + } + } // // Look up the key and value types in the old and new Slice definitions. diff --git a/cpp/src/Glacier2/Blobject.cpp b/cpp/src/Glacier2/Blobject.cpp index 3c7098e3968..3c7098e3968 100755..100644 --- a/cpp/src/Glacier2/Blobject.cpp +++ b/cpp/src/Glacier2/Blobject.cpp diff --git a/cpp/src/Glacier2/ProxyVerifier.cpp b/cpp/src/Glacier2/ProxyVerifier.cpp index a1c3943b31f..a1c3943b31f 100755..100644 --- a/cpp/src/Glacier2/ProxyVerifier.cpp +++ b/cpp/src/Glacier2/ProxyVerifier.cpp diff --git a/cpp/src/Glacier2/RequestQueue.cpp b/cpp/src/Glacier2/RequestQueue.cpp index 23ab5baaed2..23ab5baaed2 100755..100644 --- a/cpp/src/Glacier2/RequestQueue.cpp +++ b/cpp/src/Glacier2/RequestQueue.cpp diff --git a/cpp/src/Ice/Application.cpp b/cpp/src/Ice/Application.cpp index 027d42b39c8..65fa68986d5 100644 --- a/cpp/src/Ice/Application.cpp +++ b/cpp/src/Ice/Application.cpp @@ -330,7 +330,7 @@ Ice::Application::main(int argc, char* argv[], const char* configFile) catch(const std::exception& ex) { Error out(getProcessLogger()); - out << ex; + out << ex; return EXIT_FAILURE; } catch(...) diff --git a/cpp/src/Ice/Base64.cpp b/cpp/src/Ice/Base64.cpp index 187ea5b13dd..187ea5b13dd 100755..100644 --- a/cpp/src/Ice/Base64.cpp +++ b/cpp/src/Ice/Base64.cpp diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index cd32101f980..cd32101f980 100755..100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 78963794398..78963794398 100755..100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp diff --git a/cpp/src/Ice/EventLoggerMsg.h b/cpp/src/Ice/EventLoggerMsg.h index 5934c1f104f..5934c1f104f 100755..100644 --- a/cpp/src/Ice/EventLoggerMsg.h +++ b/cpp/src/Ice/EventLoggerMsg.h diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index 9a58ee47ab7..f8f09b5a81c 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -27,9 +27,9 @@ struct Property const char* deprecatedBy; Property(const char* n, bool d, const char* b) : - pattern(n), - deprecated(d), - deprecatedBy(b) + pattern(n), + deprecated(d), + deprecatedBy(b) { } diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index e2196926685..8f519f5ca55 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -161,7 +161,7 @@ Ice::AsyncResultPtr IceProxy::Ice::Object::begin_ice_isA(const string& typeId, const Context* ctx, const ::IceInternal::CallbackBasePtr& del, - const ::Ice::LocalObjectPtr& cookie) + const ::Ice::LocalObjectPtr& cookie) { OutgoingAsyncPtr __result = new OutgoingAsync(this, ice_isA_name, del, cookie); __checkAsyncTwowayOnly(ice_isA_name); diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index 232a155602e..140eb8759f4 100644 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -632,10 +632,10 @@ Ice::Service::main(int& argc, char* argv[], const InitializationData& initializa } else { - if(argv[0]) - { - cerr << argv[0] << ": "; - } + if(argv[0]) + { + cerr << argv[0] << ": "; + } cerr << "--pidfile must be followed by an argument" << endl; return EXIT_FAILURE; } @@ -654,20 +654,20 @@ Ice::Service::main(int& argc, char* argv[], const InitializationData& initializa if(!closeFiles && !daemonize) { - if(argv[0]) + if(argv[0]) { - cerr << argv[0] << ": "; - } + cerr << argv[0] << ": "; + } cerr << "--noclose must be used with --daemon" << endl; return EXIT_FAILURE; } if(pidFile.size() > 0 && !daemonize) { - if(argv[0]) + if(argv[0]) { - cerr << argv[0] << ": "; - } + cerr << argv[0] << ": "; + } cerr << "--pidfile <file> must be used with --daemon" << endl; return EXIT_FAILURE; } diff --git a/cpp/src/Ice/winrt/StreamEndpointI.cpp b/cpp/src/Ice/winrt/StreamEndpointI.cpp index d8279281e15..0b37f5d4fbf 100644 --- a/cpp/src/Ice/winrt/StreamEndpointI.cpp +++ b/cpp/src/Ice/winrt/StreamEndpointI.cpp @@ -65,7 +65,7 @@ private: IceInternal::StreamEndpointI::StreamEndpointI(const InstancePtr& instance, Ice::Short type, const string& ho, Int po, Int ti, const Ice::ProtocolVersion& protocol, - const Ice::EncodingVersion& encoding, const string& conId, bool co) : + const Ice::EncodingVersion& encoding, const string& conId, bool co) : EndpointI(protocol, encoding, conId), _instance(instance), _type(type), diff --git a/cpp/src/Ice/winrt/StreamEndpointI.h b/cpp/src/Ice/winrt/StreamEndpointI.h index 91ad87a81a5..8ebc7e3e5e1 100644 --- a/cpp/src/Ice/winrt/StreamEndpointI.h +++ b/cpp/src/Ice/winrt/StreamEndpointI.h @@ -23,7 +23,7 @@ class StreamEndpointI : public EndpointI public: StreamEndpointI(const InstancePtr&, Ice::Short, const std::string&, Ice::Int, Ice::Int, - const Ice::ProtocolVersion&, const Ice::EncodingVersion&, const std::string&, bool); + const Ice::ProtocolVersion&, const Ice::EncodingVersion&, const std::string&, bool); StreamEndpointI(const InstancePtr&, Ice::Short, const std::string&, bool); StreamEndpointI(BasicStream*, Ice::Short); diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp index bcc8ee77576..ea4e7e3e502 100644 --- a/cpp/src/IceGrid/Activator.cpp +++ b/cpp/src/IceGrid/Activator.cpp @@ -231,7 +231,7 @@ stringToSignal(const string& str) } else #endif - if(str == ICE_STRING(SIGKILL)) + if(str == ICE_STRING(SIGKILL)) { return SIGKILL; } @@ -248,10 +248,10 @@ stringToSignal(const string& str) if(*end == '\0' && signal > 0 && signal < 64) { #ifdef _WIN32 - if(signal == SIGKILL || signal == SIGTERM) - { - return static_cast<int>(signal); - } + if(signal == SIGKILL || signal == SIGTERM) + { + return static_cast<int>(signal); + } #else return static_cast<int>(signal); #endif diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index 052957900ac..a234e57ea83 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -787,7 +787,7 @@ Client::getPassword(const string& prompt) char c; while((c = _getch()) != '\r') { - password += c; + password += c; } #endif cout << endl; diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index c2d69d64e05..d2313b1ca39 100644 --- a/cpp/src/IceGrid/NodeCache.cpp +++ b/cpp/src/IceGrid/NodeCache.cpp @@ -971,22 +971,22 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const ServiceDescriptorPtr s = p->descriptor; const string path = _session->getInfo()->dataDir + "/servers/" + server->id + "/config/config_" + s->name; - // - // We escape the path here because the command-line option --Ice.Config=xxx will be parsed an encoded + // + // We escape the path here because the command-line option --Ice.Config=xxx will be parsed an encoded // (escaped) property - // For example, \\server\dir\file.cfg needs to become \\\server\dir\file.cfg or \\\\server\\dir\\file.cfg. - // + // For example, \\server\dir\file.cfg needs to become \\\server\dir\file.cfg or \\\\server\\dir\\file.cfg. + // props.push_back(createProperty("IceBox.Service." + s->name, s->entry + " --Ice.Config='" - + escapeProperty(path) + "'")); + + escapeProperty(path) + "'")); - if(servicesStr.empty()) - { - servicesStr = s->name; - } - else - { - servicesStr += " " + s->name; - } + if(servicesStr.empty()) + { + servicesStr = s->name; + } + else + { + servicesStr += " " + s->name; + } } if(!hasProperty(info.descriptor->propertySet.properties, "IceBox.InstanceName")) { diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp index 661de383582..6d219f98b9b 100644 --- a/cpp/src/IceGrid/PlatformInfo.cpp +++ b/cpp/src/IceGrid/PlatformInfo.cpp @@ -88,7 +88,7 @@ public: virtual void run() { - _platform.runUpdateLoadInfo(); + _platform.runUpdateLoadInfo(); } private: @@ -304,7 +304,7 @@ PlatformInfo::PlatformInfo(const string& prefix, _nProcessorSockets = ids.size(); #else // Not supported - _nProcessorSockets = 1; + _nProcessorSockets = 1; #endif } @@ -373,9 +373,9 @@ PlatformInfo::stop() { #if defined(_WIN32) { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_utilizationMonitor); - _terminated = true; - _utilizationMonitor.notify(); + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_utilizationMonitor); + _terminated = true; + _utilizationMonitor.notify(); } assert(_updateUtilizationThread); @@ -543,7 +543,7 @@ PlatformInfo::runUpdateLoadInfo() } catch(const Ice::LocalException&) { - // No need to print a warning, it's taken care of by getLocalizedPerfName + // No need to print a warning, it's taken care of by getLocalizedPerfName PdhCloseQuery(query); return; } @@ -563,14 +563,14 @@ PlatformInfo::runUpdateLoadInfo() while(true) { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_utilizationMonitor); - _utilizationMonitor.timedWait(IceUtil::Time::seconds(5)); // 5 seconds. - if(_terminated) - { - break; - } - - int usage = 100; + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_utilizationMonitor); + _utilizationMonitor.timedWait(IceUtil::Time::seconds(5)); // 5 seconds. + if(_terminated) + { + break; + } + + int usage = 100; PDH_STATUS err = PdhCollectQueryData(query); if(err == ERROR_SUCCESS) { @@ -584,17 +584,17 @@ PlatformInfo::runUpdateLoadInfo() Ice::Warning out(_traceLevels->logger); out << "Could not collect performance counter data:\n" << pdhErrorToString(err); } - - _last1Total += usage - _usages1.back(); - _last5Total += usage - _usages5.back(); - _last15Total += usage - _usages15.back(); - - _usages1.pop_back(); - _usages5.pop_back(); - _usages15.pop_back(); - _usages1.push_front(usage); - _usages5.push_front(usage); - _usages15.push_front(usage); + + _last1Total += usage - _usages1.back(); + _last5Total += usage - _usages5.back(); + _last15Total += usage - _usages15.back(); + + _usages1.pop_back(); + _usages5.pop_back(); + _usages15.pop_back(); + _usages1.push_front(usage); + _usages5.push_front(usage); + _usages15.push_front(usage); } PdhCloseQuery(query); diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index 08d844a608f..06330a9cc30 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -348,11 +348,11 @@ RegistryI::startImpl() registryTopicManagerId.category = _instanceName; registryTopicManagerId.name = "RegistryTopicManager"; _iceStorm = IceStormInternal::Service::create(_communicator, - registryAdapter, - registryAdapter, - "IceGrid.Registry", - registryTopicManagerId, - "Registry"); + registryAdapter, + registryAdapter, + "IceGrid.Registry", + registryTopicManagerId, + "Registry"); const IceStorm::TopicManagerPrx topicManager = _iceStorm->getTopicManager(); // diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 852c45c31f1..cc4dcf35145 100755..100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -1480,7 +1480,7 @@ ServerI::adapterDeactivated(const string& id) Lock sync(*this); while(_state == ServerI::Activating) { - wait(); // Wait for activate() to set the state to WaitForActivation + wait(); // Wait for activate() to set the state to WaitForActivation } if((_state == Active || _state == WaitForActivation) && @@ -2547,11 +2547,11 @@ ServerI::checkAndUpdateUser(const InternalServerDescriptorPtr& desc, bool update } - if(pw->pw_uid == 0 && - _node->getCommunicator()->getProperties()->getPropertyAsInt("IceGrid.Node.AllowRunningServersAsRoot") == 0) - { - throw "running server as `root' is not allowed"; - } + if(pw->pw_uid == 0 && + _node->getCommunicator()->getProperties()->getPropertyAsInt("IceGrid.Node.AllowRunningServersAsRoot") == 0) + { + throw "running server as `root' is not allowed"; + } if(update) { diff --git a/cpp/src/IceGrid/SessionServantManager.cpp b/cpp/src/IceGrid/SessionServantManager.cpp index 6de78e2bab0..0b2d61640d3 100755..100644 --- a/cpp/src/IceGrid/SessionServantManager.cpp +++ b/cpp/src/IceGrid/SessionServantManager.cpp @@ -18,7 +18,7 @@ using namespace IceGrid; SessionServantManager::SessionServantManager(const Ice::ObjectAdapterPtr& adapter, const string& instanceName, - bool checkConnection, + bool checkConnection, const string& serverAdminCategory, const Ice::ObjectPtr& serverAdminRouter, const AdminCallbackRouterPtr& adminCallbackRouter) : diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp index cc13cd3804e..2349f0ee503 100644 --- a/cpp/src/IceGrid/Util.cpp +++ b/cpp/src/IceGrid/Util.cpp @@ -111,64 +111,64 @@ IceGrid::escapeProperty(const string& s, bool escapeEqual) switch(c) { case ' ': - { - // - // We only escape the space character when it's at the beginning - // or at the end of the string - // - if(i < firstChar || i > lastChar) - { - if(previousCharIsEscape) - { - result.push_back('\\'); // escape the previous char, by adding another escape. - } + { + // + // We only escape the space character when it's at the beginning + // or at the end of the string + // + if(i < firstChar || i > lastChar) + { + if(previousCharIsEscape) + { + result.push_back('\\'); // escape the previous char, by adding another escape. + } - result.push_back('\\'); - } - result.push_back(c); - previousCharIsEscape = false; - break; - } + result.push_back('\\'); + } + result.push_back(c); + previousCharIsEscape = false; + break; + } - case '\\': + case '\\': case '#': case '=': - { - if(c == '=' && !escapeEqual) - { - previousCharIsEscape = false; - } - else - { - // - // We only escape the \ character when it is followed by a - // character that we escape, e.g. \# is encoded as \\\#, not \# - // and \\server is encoded as \\\server. - // - if(previousCharIsEscape) - { - result.push_back('\\'); // escape the previous char, by adding another escape. - } - if(c == '\\') - { - previousCharIsEscape = true; // deferring the potential escaping to the next loop - } - else - { - result.push_back('\\'); - previousCharIsEscape = false; - } - } - result.push_back(c); - break; - } + { + if(c == '=' && !escapeEqual) + { + previousCharIsEscape = false; + } + else + { + // + // We only escape the \ character when it is followed by a + // character that we escape, e.g. \# is encoded as \\\#, not \# + // and \\server is encoded as \\\server. + // + if(previousCharIsEscape) + { + result.push_back('\\'); // escape the previous char, by adding another escape. + } + if(c == '\\') + { + previousCharIsEscape = true; // deferring the potential escaping to the next loop + } + else + { + result.push_back('\\'); + previousCharIsEscape = false; + } + } + result.push_back(c); + break; + } default: - { - result.push_back(c); - previousCharIsEscape = false; - break; - } + { + result.push_back(c); + previousCharIsEscape = false; + break; + } } } return result; diff --git a/cpp/src/IceGrid/Util.h b/cpp/src/IceGrid/Util.h index 9ba84619693..9ba84619693 100755..100644 --- a/cpp/src/IceGrid/Util.h +++ b/cpp/src/IceGrid/Util.h diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp index f94c00a4197..f94c00a4197 100755..100644 --- a/cpp/src/IcePatch2/Calc.cpp +++ b/cpp/src/IcePatch2/Calc.cpp diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp index 666b8d121de..666b8d121de 100755..100644 --- a/cpp/src/IcePatch2/FileServerI.cpp +++ b/cpp/src/IcePatch2/FileServerI.cpp diff --git a/cpp/src/IcePatch2Lib/ClientUtil.cpp b/cpp/src/IcePatch2Lib/ClientUtil.cpp index 3e829cc3867..3e829cc3867 100755..100644 --- a/cpp/src/IcePatch2Lib/ClientUtil.cpp +++ b/cpp/src/IcePatch2Lib/ClientUtil.cpp diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp index 5031718739e..5031718739e 100755..100644 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ b/cpp/src/IcePatch2Lib/Util.cpp diff --git a/cpp/src/IceStorm/NodeI.cpp b/cpp/src/IceStorm/NodeI.cpp index 20da26fdb6b..1693ec694a9 100644 --- a/cpp/src/IceStorm/NodeI.cpp +++ b/cpp/src/IceStorm/NodeI.cpp @@ -853,13 +853,13 @@ NodeI::ready(int j, const string& gn, const Ice::ObjectPrx& coordinator, int max if(!_destroy && _state == NodeStateReorganization && _group == gn) { // The coordinator must be j (this was set in the invitation). - if(_coord != j) - { - Ice::Warning warn(_traceLevels->logger); - warn << _traceLevels->electionCat << ": ignoring ready call from replica node " << j - << " (real coordinator is " << _coord << ")"; - return; - } + if(_coord != j) + { + Ice::Warning warn(_traceLevels->logger); + warn << _traceLevels->electionCat << ": ignoring ready call from replica node " << j + << " (real coordinator is " << _coord << ")"; + return; + } // Here we've already validated j in the invite call // (otherwise _group != gn). @@ -923,8 +923,8 @@ NodeI::accept(int j, const string& gn, const Ice::IntSeq& forwardedInvites, cons out << *p; } out << ") with llu " - << llu.generation << "/" << llu.iteration << " into group " << gn - << " group size " << (_up.size() + 1); + << llu.generation << "/" << llu.iteration << " into group " << gn + << " group size " << (_up.size() + 1); } // Add each of the forwarded invites to the list of issued @@ -946,7 +946,7 @@ NodeI::accept(int j, const string& gn, const Ice::IntSeq& forwardedInvites, cons // merge continue immediately. Otherwise, we let the existing // merge() schedule continue. if((_up.size() == _nodes.size()-1 || _invitesIssued == _invitesAccepted) && - _mergeContinueTask && _timer->cancel(_mergeContinueTask)) + _mergeContinueTask && _timer->cancel(_mergeContinueTask)) { _timer->schedule(_mergeContinueTask, IceUtil::Time::seconds(0)); } diff --git a/cpp/src/IceStorm/NodeI.h b/cpp/src/IceStorm/NodeI.h index f32de3a5d6a..3e6ac1efe64 100644 --- a/cpp/src/IceStorm/NodeI.h +++ b/cpp/src/IceStorm/NodeI.h @@ -41,7 +41,7 @@ public: virtual void invitation(int, const std::string&, const Ice::Current&); virtual void ready(int, const std::string&, const Ice::ObjectPrx&, int, Ice::Long, const Ice::Current&); virtual void accept(int, const std::string&, const Ice::IntSeq&, const Ice::ObjectPrx&, const LogUpdate&, int, - const Ice::Current&); + const Ice::Current&); virtual bool areYouCoordinator(const Ice::Current&) const; virtual bool areYouThere(const std::string&, int, const Ice::Current&) const; virtual Ice::ObjectPrx sync(const Ice::Current&) const; diff --git a/cpp/src/IceStorm/Replica.h b/cpp/src/IceStorm/Replica.h index be76437a499..3a0ffc93c99 100644 --- a/cpp/src/IceStorm/Replica.h +++ b/cpp/src/IceStorm/Replica.h @@ -27,7 +27,7 @@ struct GroupNodeInfo // COMPILER FIX: Clang using libc++ requires to define operator= // #if defined(__clang__) && defined(_LIBCPP_VERSION) - GroupNodeInfo& operator=(const GroupNodeInfo&); + GroupNodeInfo& operator=(const GroupNodeInfo&); #endif const int id; const LogUpdate llu; diff --git a/cpp/src/IceStorm/Subscriber.cpp b/cpp/src/IceStorm/Subscriber.cpp index 95ea74c6265..95ea74c6265 100755..100644 --- a/cpp/src/IceStorm/Subscriber.cpp +++ b/cpp/src/IceStorm/Subscriber.cpp diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp index 7f1ea6b67b9..460e291c0ef 100644 --- a/cpp/src/IceStorm/TopicI.cpp +++ b/cpp/src/IceStorm/TopicI.cpp @@ -670,7 +670,7 @@ TopicImpl::subscribe(const QoS& origQoS, const Ice::ObjectPrx& obj) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } Ice::IdentitySeq ids; ids.push_back(id); @@ -708,7 +708,7 @@ TopicImpl::subscribe(const QoS& origQoS, const Ice::ObjectPrx& obj) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } _subscribers.push_back(subscriber); @@ -792,7 +792,7 @@ TopicImpl::subscribeAndGetPublisher(const QoS& qos, const Ice::ObjectPrx& obj) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } _subscribers.push_back(subscriber); @@ -916,7 +916,7 @@ TopicImpl::link(const TopicPrx& topic, Ice::Int cost) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } _subscribers.push_back(subscriber); @@ -995,7 +995,7 @@ TopicImpl::shutdown() // Shutdown each subscriber. This waits for the event queues to drain. for(vector<SubscriberPtr>::const_iterator p = _subscribers.begin(); p != _subscribers.end(); ++p) { - (*p)->shutdown(); + (*p)->shutdown(); } _observer.detach(); @@ -1326,7 +1326,7 @@ TopicImpl::observerAddSubscriber(const LogUpdate& llu, const SubscriberRecord& r catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } _subscribers.push_back(subscriber); @@ -1397,7 +1397,7 @@ TopicImpl::observerRemoveSubscriber(const LogUpdate& llu, const Ice::IdentitySeq catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } } @@ -1444,7 +1444,7 @@ TopicImpl::updateSubscriberObservers() IceUtil::Mutex::Lock sync(_subscribersMutex); for(vector<SubscriberPtr>::const_iterator p = _subscribers.begin(); p != _subscribers.end(); ++p) { - (*p)->updateObserver(); + (*p)->updateObserver(); } } @@ -1497,7 +1497,7 @@ TopicImpl::destroyInternal(const LogUpdate& origLLU, bool master) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } _instance->topicAdapter()->remove(_id); @@ -1570,7 +1570,7 @@ TopicImpl::removeSubscribers(const Ice::IdentitySeq& ids) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } _instance->observers()->removeSubscriber(llu, _name, ids); diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp index 9601d004481..6c13513a608 100644 --- a/cpp/src/IceStorm/TopicManagerI.cpp +++ b/cpp/src/IceStorm/TopicManagerI.cpp @@ -413,7 +413,7 @@ TopicManagerImpl::create(const string& name) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } _instance->observers()->createTopic(llu, name); @@ -529,7 +529,7 @@ TopicManagerImpl::observerInit(const LogUpdate& llu, const TopicContentSeq& cont catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } // We do this with two scans. The first runs through the topics @@ -628,7 +628,7 @@ TopicManagerImpl::observerCreateTopic(const LogUpdate& llu, const string& name) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } installTopic(name, id, true); } @@ -716,7 +716,7 @@ TopicManagerImpl::getContent(LogUpdate& llu, TopicContentSeq& content) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } } @@ -803,7 +803,7 @@ TopicManagerImpl::initMaster(const set<GroupNodeInfo>& slaves, const LogUpdate& catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } // Now initialize the observers. diff --git a/cpp/src/IceStorm/TransientTopicI.cpp b/cpp/src/IceStorm/TransientTopicI.cpp index 25ecb67e32c..fb65e2400d7 100644 --- a/cpp/src/IceStorm/TransientTopicI.cpp +++ b/cpp/src/IceStorm/TransientTopicI.cpp @@ -580,6 +580,6 @@ TransientTopicImpl::shutdown() // Shutdown each subscriber. This waits for the event queues to drain. for(vector<SubscriberPtr>::const_iterator p = _subscribers.begin(); p != _subscribers.end(); ++p) { - (*p)->shutdown(); + (*p)->shutdown(); } } diff --git a/cpp/src/IceUtil/Shared.cpp b/cpp/src/IceUtil/Shared.cpp index 0ce3b28b66c..39805cc746e 100644 --- a/cpp/src/IceUtil/Shared.cpp +++ b/cpp/src/IceUtil/Shared.cpp @@ -36,9 +36,9 @@ namespace IceUtilInternal static inline void atomicInc(volatile int* counter) { __asm__ __volatile__( - "lock ; incl %0" - :"=m" (*counter) - :"m" (*counter)); + "lock ; incl %0" + :"=m" (*counter) + :"m" (*counter)); } /** @@ -55,9 +55,9 @@ static inline int atomicDecAndTest(volatile int* counter) { unsigned char c; __asm__ __volatile__( - "lock ; decl %0; sete %1" - :"=m" (*counter), "=qm" (c) - :"m" (*counter) : "memory"); + "lock ; decl %0; sete %1" + :"=m" (*counter), "=qm" (c) + :"m" (*counter) : "memory"); return c != 0; } @@ -72,10 +72,10 @@ static inline int atomicExchangeAdd(volatile int* counter, int i) { int tmp = i; __asm__ __volatile__( - "lock ; xadd %0,(%2)" - :"+r"(tmp), "=m"(*counter) - :"r"(counter), "m"(*counter) - : "memory"); + "lock ; xadd %0,(%2)" + :"+r"(tmp), "=m"(*counter) + :"r"(counter), "m"(*counter) + : "memory"); return tmp + i; } diff --git a/cpp/src/IceUtil/StringUtil.cpp b/cpp/src/IceUtil/StringUtil.cpp index ec54ef9cf9c..c862e5c236e 100644 --- a/cpp/src/IceUtil/StringUtil.cpp +++ b/cpp/src/IceUtil/StringUtil.cpp @@ -570,20 +570,20 @@ IceUtilInternal::errorToString(int error, LPCVOID source) result = result.substr(0, result.length() - 2); } #ifndef ICE_OS_WINRT - if(msg) - { + if(msg) + { LocalFree(msg); - } + } #endif return IceUtil::wstringToString(result); } else { #ifndef ICE_OS_WINRT - if(msg) - { + if(msg) + { LocalFree(msg); - } + } #endif ostringstream os; os << "unknown error: " << error; diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp index cb2d77a1992..4bef2ba2116 100644 --- a/cpp/src/IceUtil/UUID.cpp +++ b/cpp/src/IceUtil/UUID.cpp @@ -98,7 +98,7 @@ IceUtil::generateUUID() RPC_STATUS ret = UuidCreate(&uuid); if(ret != RPC_S_OK && ret != RPC_S_UUID_LOCAL_ONLY && ret != RPC_S_UUID_NO_ADDRESS) { - throw new SyscallException(__FILE__, __LINE__, GetLastError()); + throw new SyscallException(__FILE__, __LINE__, GetLastError()); } unsigned char* str; @@ -106,7 +106,7 @@ IceUtil::generateUUID() ret = UuidToString(&uuid, &str); if(ret != RPC_S_OK) { - throw new SyscallException(__FILE__, __LINE__, GetLastError()); + throw new SyscallException(__FILE__, __LINE__, GetLastError()); } string result = reinterpret_cast<char*>(str); diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 086e839b195..403fc9b15b5 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -1006,12 +1006,12 @@ Slice::findMetaData(const StringList& metaData, int typeCtx) { string::size_type pos = str.find(':', prefix.size()); - // + // // If the form is cpp:type:<...> the data after cpp:type: // is returned. - // If the form is cpp:range[:<...>], cpp:array or cpp:class, - // the return value is % followed by the string after cpp:. - // + // If the form is cpp:range[:<...>], cpp:array or cpp:class, + // the return value is % followed by the string after cpp:. + // if(pos != string::npos) { string ss = str.substr(prefix.size()); diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index cf9597e2e91..699bcb37c0e 100644 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -2117,12 +2117,12 @@ Slice::CsGenerator::MetaDataVisitor::visitUnitStart(const UnitPtr& p) continue; } emitWarning(file, -1, "ignoring invalid global metadata `" + s + "'"); - _history.insert(s); + _history.insert(s); } else if(s.find(clrPrefix) == 0) { emitWarning(file, -1, "ignoring invalid global metadata `" + s + "'"); - _history.insert(s); + _history.insert(s); } } } diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 881353ef07b..1a5b0829618 100755..100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -2205,10 +2205,10 @@ Slice::Container::checkIdentifier(const string& name) const static const string suffixBlacklist[] = { "Helper", "Holder", "Prx", "Ptr" }; for(size_t i = 0; i < sizeof(suffixBlacklist) / sizeof(*suffixBlacklist); ++i) { - if(name.find(suffixBlacklist[i], name.size() - suffixBlacklist[i].size()) != string::npos) - { - _unit->error("illegal identifier `" + name + "': `" + suffixBlacklist[i] + "' suffix is reserved"); - } + if(name.find(suffixBlacklist[i], name.size() - suffixBlacklist[i].size()) != string::npos) + { + _unit->error("illegal identifier `" + name + "': `" + suffixBlacklist[i] + "' suffix is reserved"); + } } // diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index 4fd9a510ee1..4fd9a510ee1 100755..100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp index 558f4d42623..558f4d42623 100755..100644 --- a/cpp/src/Slice/RubyUtil.cpp +++ b/cpp/src/Slice/RubyUtil.cpp diff --git a/cpp/src/iceserviceinstall/ServiceInstaller.cpp b/cpp/src/iceserviceinstall/ServiceInstaller.cpp index 7fddc88f59c..20178ea72c8 100644 --- a/cpp/src/iceserviceinstall/ServiceInstaller.cpp +++ b/cpp/src/iceserviceinstall/ServiceInstaller.cpp @@ -64,7 +64,7 @@ IceServiceInstaller::IceServiceInstaller(int serviceType, const string& configFi } else { - Ice::LocatorPrx defaultLocator = LocatorPrx::uncheckedCast( + Ice::LocatorPrx defaultLocator = LocatorPrx::uncheckedCast( _communicator->stringToProxy(_serviceProperties->getProperty("Ice.Default.Locator"))); if(defaultLocator != 0) { diff --git a/cpp/src/slice2confluence/Gen.cpp b/cpp/src/slice2confluence/Gen.cpp index 42425db59cd..42425db59cd 100755..100644 --- a/cpp/src/slice2confluence/Gen.cpp +++ b/cpp/src/slice2confluence/Gen.cpp diff --git a/cpp/src/slice2confluence/Main.cpp b/cpp/src/slice2confluence/Main.cpp index 346daddcf8f..346daddcf8f 100755..100644 --- a/cpp/src/slice2confluence/Main.cpp +++ b/cpp/src/slice2confluence/Main.cpp diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 80f6b7deab1..7a93d08ebb4 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -369,7 +369,7 @@ Slice::Gen::generate(const UnitPtr& p) H << "\n#include <Ice/Proxy.h>"; H << "\n#include <Ice/Object.h>"; H << "\n#include <Ice/Outgoing.h>"; - H << "\n#include <Ice/OutgoingAsync.h>"; + H << "\n#include <Ice/OutgoingAsync.h>"; H << "\n#include <Ice/Incoming.h>"; if(p->hasContentsWithMetaData("amd")) { @@ -1481,14 +1481,14 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p) if(_dllExport != "") { - // - // To export the virtual table - // - C << nl << "#ifdef __SUNPRO_CC"; - C << nl << "class " - << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ") - << "IceProxy" << scoped << ";"; - C << nl << "#endif"; + // + // To export the virtual table + // + C << nl << "#ifdef __SUNPRO_CC"; + C << nl << "class " + << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ") + << "IceProxy" << scoped << ";"; + C << nl << "#endif"; } C << nl @@ -2141,7 +2141,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) string flatName = p->flattenedScope() + name + "_name"; if(p->returnsData()) { - C << nl << "__checkAsyncTwowayOnly(" << flatName << ");"; + C << nl << "__checkAsyncTwowayOnly(" << flatName << ");"; } C << nl << "::IceInternal::OutgoingAsyncPtr __result = new ::IceInternal::OutgoingAsync(this, "; C << flatName << ", __del, __cookie);"; @@ -3320,7 +3320,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) if(p->name() != "PointerType") { - H << nl << "typedef " << p->name() << "Ptr PointerType;"; + H << nl << "typedef " << p->name() << "Ptr PointerType;"; } vector<string> params; @@ -3479,36 +3479,36 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) if(!p->isLocal()) { C << sp << nl - << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ") - << "::Ice::Object* " << scope.substr(2) << "upCast(" << scoped << "* p) { return p; }"; - - // - // It would make sense to provide a covariant ice_clone(); unfortunately many compilers - // (including VS2010) generate bad code for covariant types that use virtual inheritance - // - - if(!p->isInterface()) - { - H << nl << "virtual ::Ice::ObjectPtr ice_clone() const;"; - - C << nl << "::Ice::ObjectPtr"; - C << nl << scoped.substr(2) << "::ice_clone() const"; - C << sb; - if(!p->isAbstract()) - { - C << nl << "::Ice::Object* __p = new " << name << "(*this);"; - C << nl << "return __p;"; - } - else - { - // - // We need this ice_clone for abstract classes derived from concrete classes - // - C << nl << "throw ::Ice::CloneNotImplementedException(__FILE__, __LINE__);"; - C << nl << "return 0; // to avoid a warning with some compilers"; - } - C << eb; - } + << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ") + << "::Ice::Object* " << scope.substr(2) << "upCast(" << scoped << "* p) { return p; }"; + + // + // It would make sense to provide a covariant ice_clone(); unfortunately many compilers + // (including VS2010) generate bad code for covariant types that use virtual inheritance + // + + if(!p->isInterface()) + { + H << nl << "virtual ::Ice::ObjectPtr ice_clone() const;"; + + C << nl << "::Ice::ObjectPtr"; + C << nl << scoped.substr(2) << "::ice_clone() const"; + C << sb; + if(!p->isAbstract()) + { + C << nl << "::Ice::Object* __p = new " << name << "(*this);"; + C << nl << "return __p;"; + } + else + { + // + // We need this ice_clone for abstract classes derived from concrete classes + // + C << nl << "throw ::Ice::CloneNotImplementedException(__FILE__, __LINE__);"; + C << nl << "return 0; // to avoid a warning with some compilers"; + } + C << eb; + } ClassList allBases = p->allBases(); StringList ids; @@ -3597,8 +3597,8 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) else { C << sp << nl - << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ") - << "::Ice::LocalObject* " << scope.substr(2) << "upCast(" << scoped << "* p) { return p; }"; + << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ") + << "::Ice::LocalObject* " << scope.substr(2) << "upCast(" << scoped << "* p) { return p; }"; } return true; @@ -4049,7 +4049,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) else { C << sp << nl << "void " - << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT "); + << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT "); C << nl << scope.substr(2) << "__patch(" << p->name() << "Ptr& handle, ::Ice::ObjectPtr& v)"; C << sb; C << nl << "handle = " << scope << p->name() << "Ptr::dynamicCast(v);"; diff --git a/cpp/src/slice2cs/Gen.h b/cpp/src/slice2cs/Gen.h index a8ff7998842..9695fa56e98 100644 --- a/cpp/src/slice2cs/Gen.h +++ b/cpp/src/slice2cs/Gen.h @@ -150,7 +150,7 @@ private: virtual void visitModuleEnd(const ModulePtr&); virtual bool visitClassDefStart(const ClassDefPtr&); virtual void visitClassDefEnd(const ClassDefPtr&); - virtual void visitOperation(const OperationPtr&); + virtual void visitOperation(const OperationPtr&); }; class ProxyVisitor : public CsVisitor diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp index bd639993f40..bd639993f40 100755..100644 --- a/cpp/src/slice2freezej/Main.cpp +++ b/cpp/src/slice2freezej/Main.cpp diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp index 08eed8b4cf6..295846612c9 100755..100644 --- a/cpp/src/slice2html/Gen.cpp +++ b/cpp/src/slice2html/Gen.cpp @@ -1804,7 +1804,7 @@ Slice::StartPageGenerator::printHeaderFooter() if(!imageDir.empty()) { - start("td align=\"right\""); + start("td align=\"right\""); start("table"); start("tr"); start("td"); @@ -1821,7 +1821,7 @@ Slice::StartPageGenerator::printHeaderFooter() end(); // td end(); // tr end(); // table - end(); // td + end(); // td } end(); // tr diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp index 4d4dba8d0e9..4d4dba8d0e9 100755..100644 --- a/cpp/src/slice2html/Main.cpp +++ b/cpp/src/slice2html/Main.cpp diff --git a/cpp/test/Freeze/dbmap/Client.cpp b/cpp/test/Freeze/dbmap/Client.cpp index 1c4525123c5..edac3b40b14 100644 --- a/cpp/test/Freeze/dbmap/Client.cpp +++ b/cpp/test/Freeze/dbmap/Client.cpp @@ -72,7 +72,7 @@ populateDB(const Freeze::ConnectionPtr& connection, ByteIntMap& m) TransactionHolder txHolder(connection); for(size_t j = 0; j < length; ++j) { - m.put(ByteIntMap::value_type(localAlphabet[j], static_cast<Int>(j))); + m.put(ByteIntMap::value_type(localAlphabet[j], static_cast<Int>(j))); } txHolder.commit(); break; @@ -98,14 +98,14 @@ public: ReadThread(const CommunicatorPtr& communicator, const string& envName, const string& dbName) : _connection(createConnection(communicator, envName)), _map(_connection, dbName), - _done(false) + _done(false) { } virtual void run() { - bool more = false; + bool more = false; do { @@ -138,18 +138,18 @@ public: } } - { - IceUtil::Mutex::Lock lock(_doneMutex); - more = !_done; - } + { + IceUtil::Mutex::Lock lock(_doneMutex); + more = !_done; + } - } while(more); + } while(more); } void stop() { - IceUtil::Mutex::Lock lock(_doneMutex); - _done = true; + IceUtil::Mutex::Lock lock(_doneMutex); + _done = true; } private: @@ -170,14 +170,14 @@ public: WriteThread(const CommunicatorPtr& communicator, const string& envName, const string& dbName) : _connection(createConnection(communicator, envName)), _map(_connection, dbName), - _done(false) + _done(false) { } virtual void run() { - bool more = false; + bool more = false; // // Delete an recreate each object @@ -195,7 +195,7 @@ public: _map.erase(p); } txHolder.commit(); - break; // for (;;) + break; // for (;;) } catch(const DeadlockException&) { @@ -216,81 +216,81 @@ public: } populateDB(_connection, _map); - - // - // Now update without a transaction - // - - for(char c = 'a'; c != 'd'; ++c) - { - for(;;) - { - bool thrownBySet = false; - try - { - ByteIntMap::iterator p = _map.find(c); - try - { - if(p != _map.end()) - { - if(p->first == p->second + 'a') - { - p.set(p->first - 'A'); - } - else - { - p.set(p->first - 'a'); - } - } - } - catch(const DeadlockException&) - { - thrownBySet = true; - throw; - } - break; // for (;;) - } - catch(const DeadlockException&) - { - if(!thrownBySet) - { - cerr << "DeadlockException thrown by destructor!" << endl; - test(false); - } - + + // + // Now update without a transaction + // + + for(char c = 'a'; c != 'd'; ++c) + { + for(;;) + { + bool thrownBySet = false; + try + { + ByteIntMap::iterator p = _map.find(c); + try + { + if(p != _map.end()) + { + if(p->first == p->second + 'a') + { + p.set(p->first - 'A'); + } + else + { + p.set(p->first - 'a'); + } + } + } + catch(const DeadlockException&) + { + thrownBySet = true; + throw; + } + break; // for (;;) + } + catch(const DeadlockException&) + { + if(!thrownBySet) + { + cerr << "DeadlockException thrown by destructor!" << endl; + test(false); + } + #ifdef SHOW_EXCEPTIONS - if(thrownBySet) - { - cerr << "S" << flush; - } - else - { - cerr << "D" << flush; - } + if(thrownBySet) + { + cerr << "S" << flush; + } + else + { + cerr << "D" << flush; + } #endif - // Try again - } - catch(const InvalidPositionException&) - { + // Try again + } + catch(const InvalidPositionException&) + { #ifdef SHOW_EXCEPTIONS - cerr << "I" << flush; + cerr << "I" << flush; #endif - break; - } - } - } - - { - IceUtil::Mutex::Lock lock(_doneMutex); - more = !_done; - } + break; + } + } + } + + { + IceUtil::Mutex::Lock lock(_doneMutex); + more = !_done; + } } while(more); } void stop() { - IceUtil::Mutex::Lock lock(_doneMutex); - _done = true; + IceUtil::Mutex::Lock lock(_doneMutex); + _done = true; } private: @@ -729,23 +729,23 @@ run(const CommunicatorPtr& communicator, const string& envName) { ReadThreadPtr rt = new ReadThread(communicator, envName, dbName); controls.push_back(rt->start()); - readThreads.push_back(rt); + readThreads.push_back(rt); WriteThreadPtr wt = new WriteThread(communicator, envName, dbName); controls.push_back(wt->start()); - writeThreads.push_back(wt); + writeThreads.push_back(wt); } IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(CONCURRENT_TIME)); for(vector<WriteThreadPtr>::iterator q = writeThreads.begin(); q != writeThreads.end(); ++q) { - (*q)->stop(); + (*q)->stop(); } for(vector<ReadThreadPtr>::iterator q = readThreads.begin(); q != readThreads.end(); ++q) { - (*q)->stop(); + (*q)->stop(); } for(vector<IceUtil::ThreadControl>::iterator q = controls.begin(); q != controls.end(); ++q) diff --git a/cpp/test/Freeze/evictor/Client.cpp b/cpp/test/Freeze/evictor/Client.cpp index 1dc38845e76..be7f8493939 100644 --- a/cpp/test/Freeze/evictor/Client.cpp +++ b/cpp/test/Freeze/evictor/Client.cpp @@ -372,12 +372,12 @@ public: // // Transfer 100 at random between two distinct accounts // - Test::AccountPrx from = _accounts[IceUtilInternal::random(static_cast<int>(_accounts.size()))]; + Test::AccountPrx from = _accounts[IceUtilInternal::random(static_cast<int>(_accounts.size()))]; Test::AccountPrx to; do { - to = _accounts[IceUtilInternal::random(static_cast<int>(_accounts.size()))]; + to = _accounts[IceUtilInternal::random(static_cast<int>(_accounts.size()))]; } while(from == to); @@ -613,8 +613,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator, bool trans // try { - Test::AccountPrx::uncheckedCast(servants[0])->getBalance(); - test(false); + Test::AccountPrx::uncheckedCast(servants[0])->getBalance(); + test(false); } catch(const Ice::OperationNotExistException&) { diff --git a/cpp/test/Glacier2/override/Client.cpp b/cpp/test/Glacier2/override/Client.cpp index d35f638d37f..9945f1f05c0 100644 --- a/cpp/test/Glacier2/override/Client.cpp +++ b/cpp/test/Glacier2/override/Client.cpp @@ -155,21 +155,21 @@ CallbackClient::run(int argc, char* argv[]) callbackReceiverImpl->activate(); test(callbackReceiverImpl->callbackWithPayloadOK(4) == 0); - int remainingCallbacks = callbackReceiverImpl->callbackOK(1, 0); - // - // Occasionally, Glacier2 flushes in the middle of our 5 - // callbacks, so we get more than 1 callback - // (in theory we could get up to 5 total - more than 1 extra is extremely unlikely) - // - // The sleep above is also important as we want to have enough - // time to receive this (these) extra callback(s). - // - test(remainingCallbacks <= 4); - if(remainingCallbacks > 0) - { - test(callbackReceiverImpl->callbackOK(remainingCallbacks, 0) == 0); - } - + int remainingCallbacks = callbackReceiverImpl->callbackOK(1, 0); + // + // Occasionally, Glacier2 flushes in the middle of our 5 + // callbacks, so we get more than 1 callback + // (in theory we could get up to 5 total - more than 1 extra is extremely unlikely) + // + // The sleep above is also important as we want to have enough + // time to receive this (these) extra callback(s). + // + test(remainingCallbacks <= 4); + if(remainingCallbacks > 0) + { + test(callbackReceiverImpl->callbackOK(remainingCallbacks, 0) == 0); + } + ctx["_fwd"] = "O"; oneway->initiateCallbackWithPayload(twowayR); diff --git a/cpp/test/Ice/custom/AllTests.cpp b/cpp/test/Ice/custom/AllTests.cpp index f9d746cfb95..f9d746cfb95 100755..100644 --- a/cpp/test/Ice/custom/AllTests.cpp +++ b/cpp/test/Ice/custom/AllTests.cpp diff --git a/cpp/test/Ice/invoke/BlobjectI.cpp b/cpp/test/Ice/invoke/BlobjectI.cpp index 7d7d3612a43..7d7d3612a43 100755..100644 --- a/cpp/test/Ice/invoke/BlobjectI.cpp +++ b/cpp/test/Ice/invoke/BlobjectI.cpp diff --git a/cpp/test/Ice/metrics/AllTests.cpp b/cpp/test/Ice/metrics/AllTests.cpp index 4f83d4b0fbe..85f5062c958 100644 --- a/cpp/test/Ice/metrics/AllTests.cpp +++ b/cpp/test/Ice/metrics/AllTests.cpp @@ -400,7 +400,7 @@ allTests(const Ice::CommunicatorPtr& communicator) IceMX::MetricsView view = clientMetrics->getMetricsView("View", timestamp); test(view["Connection"].size() == 1 && view["Connection"][0]->current == 1 && view["Connection"][0]->total == 1); test(view["Thread"].size() == 1 && view["Thread"][0]->current == threadCount && - view["Thread"][0]->total == threadCount); + view["Thread"][0]->total == threadCount); cout << "ok" << endl; cout << "testing group by id..." << flush; diff --git a/cpp/test/Ice/objects/AllTests.cpp b/cpp/test/Ice/objects/AllTests.cpp index d1eb70a22de..0acf1cc340d 100644 --- a/cpp/test/Ice/objects/AllTests.cpp +++ b/cpp/test/Ice/objects/AllTests.cpp @@ -98,8 +98,8 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) AbstractBasePtr abp1 = new AbstractBaseI; try { - abp1->ice_clone(); - test(false); + abp1->ice_clone(); + test(false); } catch(const Ice::CloneNotImplementedException&) { diff --git a/cpp/test/Ice/operations/TestAMDI.cpp b/cpp/test/Ice/operations/TestAMDI.cpp index a51f098457a..a51f098457a 100755..100644 --- a/cpp/test/Ice/operations/TestAMDI.cpp +++ b/cpp/test/Ice/operations/TestAMDI.cpp diff --git a/cpp/test/Ice/operations/TestI.cpp b/cpp/test/Ice/operations/TestI.cpp index dd8b755edf3..dd8b755edf3 100755..100644 --- a/cpp/test/Ice/operations/TestI.cpp +++ b/cpp/test/Ice/operations/TestI.cpp diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp index a451acb0887..d59e18810d8 100644 --- a/cpp/test/Ice/operations/Twoways.cpp +++ b/cpp/test/Ice/operations/Twoways.cpp @@ -797,7 +797,7 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p) } } #endif - } + } { Ice::Double d = 1278312346.0 / 13.0; diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp index 5fd79282d58..5e1c54e6df5 100644 --- a/cpp/test/Ice/operations/TwowaysAMI.cpp +++ b/cpp/test/Ice/operations/TwowaysAMI.cpp @@ -977,10 +977,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p) } { - // + // // Check that a call to a twoway operation raises NoEndpointException // in the ice_exception() callback instead of at the point of call. - // + // Test::MyClassPrx indirect = Test::MyClassPrx::uncheckedCast(p->ice_adapterId("dummy")); AMI_MyClass_opByteExIPtr cb = new AMI_MyClass_opByteExI; try @@ -1004,9 +1004,9 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p) } { - // + // // Check that CommunicatorDestroyedException is raised directly. - // + // Ice::InitializationData initData; initData.properties = communicator->getProperties()->clone(); Ice::CommunicatorPtr ic = Ice::initialize(initData); diff --git a/cpp/test/Ice/properties/Client.cpp b/cpp/test/Ice/properties/Client.cpp index b7b1ff02799..b7b1ff02799 100755..100644 --- a/cpp/test/Ice/properties/Client.cpp +++ b/cpp/test/Ice/properties/Client.cpp diff --git a/cpp/test/Ice/stream/Client.cpp b/cpp/test/Ice/stream/Client.cpp index 949f2770746..71b7c0b2685 100755..100644 --- a/cpp/test/Ice/stream/Client.cpp +++ b/cpp/test/Ice/stream/Client.cpp @@ -150,7 +150,7 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator) MyClassFactoryWrapperPtr factoryWrapper = new MyClassFactoryWrapper; communicator->addObjectFactory(factoryWrapper, Test::MyClass::ice_staticId()); communicator->addObjectFactory(new MyInterfaceFactory, Test::MyInterface::ice_staticId()); - + Ice::InputStreamPtr in; Ice::OutputStreamPtr out; vector<Ice::Byte> data; diff --git a/cpp/test/Ice/stringConverter/Client.cpp b/cpp/test/Ice/stringConverter/Client.cpp index a6b8ed7a811..048e2bf8f86 100644 --- a/cpp/test/Ice/stringConverter/Client.cpp +++ b/cpp/test/Ice/stringConverter/Client.cpp @@ -86,11 +86,11 @@ main(int argc, char* argv[]) #elif defined(__hpux) if(useLocale) { - initData.stringConverter = new Ice::IconvStringConverter<char>; + initData.stringConverter = new Ice::IconvStringConverter<char>; } else { - initData.stringConverter = new Ice::IconvStringConverter<char>("iso815"); + initData.stringConverter = new Ice::IconvStringConverter<char>("iso815"); } initData.wstringConverter = new Ice::IconvStringConverter<wchar_t>("ucs4"); #else @@ -98,12 +98,12 @@ main(int argc, char* argv[]) if(useLocale) { #ifndef _WIN32 - initData.stringConverter = new Ice::IconvStringConverter<char>; + initData.stringConverter = new Ice::IconvStringConverter<char>; #endif } else { - initData.stringConverter = new Ice::IconvStringConverter<char>("ISO8859-15"); + initData.stringConverter = new Ice::IconvStringConverter<char>("ISO8859-15"); } if(sizeof(wchar_t) == 4) diff --git a/cpp/test/IceStorm/rep1/Publisher.cpp b/cpp/test/IceStorm/rep1/Publisher.cpp index 62770b8632a..7671da08ec7 100644 --- a/cpp/test/IceStorm/rep1/Publisher.cpp +++ b/cpp/test/IceStorm/rep1/Publisher.cpp @@ -82,15 +82,15 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator) Ice::ObjectPrx prx = topic->getPublisher()->ice_twoway(); vector<SinglePrx> single; Ice::EndpointSeq endpoints = prx->ice_getEndpoints(); - for(Ice::EndpointSeq::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p) - { + for(Ice::EndpointSeq::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p) + { if((*p)->toString().substr(0, 3) != "udp") { Ice::EndpointSeq e; e.push_back(*p); single.push_back(SinglePrx::uncheckedCast(prx->ice_endpoints(e))); } - } + } if(single.size() <= 1) { cerr << argv[0] << ": Not enough endpoints in publisher proxy" << endl; diff --git a/cpp/test/IceStorm/repstress/Publisher.cpp b/cpp/test/IceStorm/repstress/Publisher.cpp index 9f3eff6d7ca..76948483085 100644 --- a/cpp/test/IceStorm/repstress/Publisher.cpp +++ b/cpp/test/IceStorm/repstress/Publisher.cpp @@ -54,7 +54,7 @@ public: try { _single->event(_published); - IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1)); + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1)); } catch(const Ice::UnknownException&) { diff --git a/cpp/test/IceUtil/condvar/WorkQueue.cpp b/cpp/test/IceUtil/condvar/WorkQueue.cpp index 7d093b7279e..e3f91c6a396 100644 --- a/cpp/test/IceUtil/condvar/WorkQueue.cpp +++ b/cpp/test/IceUtil/condvar/WorkQueue.cpp @@ -28,21 +28,21 @@ public: void decrement() { Monitor<Mutex>::Lock lock(*this); - assert(_count > 0); - --_count; - if(_count == 0) - { - notifyAll(); - } + assert(_count > 0); + --_count; + if(_count == 0) + { + notifyAll(); + } } void waitZero() { Monitor<Mutex>::Lock lock(*this); - while(_count > 0) - { - wait(); - } + while(_count > 0) + { + wait(); + } } private: @@ -80,7 +80,7 @@ public: { Monitor<Mutex>::Lock lock(*this); _terminate = true; - notifyAll(); + notifyAll(); } bool @@ -105,10 +105,10 @@ public: assert(!_q.empty()); ret = _q.front(); - if(ret % 100 == 0) - { - cout << "." << flush; - } + if(ret % 100 == 0) + { + cout << "." << flush; + } _q.pop_front(); return true; } @@ -126,16 +126,16 @@ public: // empty. if(_q.empty()) { - assert(_terminate); + assert(_terminate); return -1; } assert(!_q.empty()); int ret = _q.front(); - if(ret % 100 == 0) - { - cout << "." << flush; - } + if(ret % 100 == 0) + { + cout << "." << flush; + } _q.pop_front(); return ret; } @@ -158,18 +158,18 @@ public: virtual void run() { - _cd->decrement(); + _cd->decrement(); while(true) { int res = 0; - if(_poll) - { - _q->timedGet(res, Time::milliSeconds(10)); - } - else - { - res = _q->get(); - } + if(_poll) + { + _q->timedGet(res, Time::milliSeconds(10)); + } + else + { + res = _q->get(); + } if(res == -1) { return; @@ -196,14 +196,14 @@ public: virtual void run() { - _cd->decrement(); + _cd->decrement(); // Forever if(_v == 0) { while(true) { _q->put(_v++); - ThreadControl::yield(); + ThreadControl::yield(); } } else diff --git a/cpp/test/WinRT/TestSuite/App.xaml.cpp b/cpp/test/WinRT/TestSuite/App.xaml.cpp index 45902d60d63..9272b941977 100644 --- a/cpp/test/WinRT/TestSuite/App.xaml.cpp +++ b/cpp/test/WinRT/TestSuite/App.xaml.cpp @@ -30,8 +30,8 @@ using namespace Windows::UI::Xaml::Navigation; /// </summary>
App::App()
{
- InitializeComponent();
- Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
+ InitializeComponent();
+ Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
}
/// <summary>
@@ -42,29 +42,29 @@ App::App() /// <param name="pArgs">Details about the launch request and process.</param>
void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs)
{
- // Do not repeat app initialization when already running, just ensure that
- // the window is active
- if (pArgs->PreviousExecutionState == ApplicationExecutionState::Running)
- {
- Window::Current->Activate();
- return;
- }
+ // Do not repeat app initialization when already running, just ensure that
+ // the window is active
+ if (pArgs->PreviousExecutionState == ApplicationExecutionState::Running)
+ {
+ Window::Current->Activate();
+ return;
+ }
- if (pArgs->PreviousExecutionState == ApplicationExecutionState::Terminated)
- {
- //TODO: Load state from previously suspended application
- }
+ if (pArgs->PreviousExecutionState == ApplicationExecutionState::Terminated)
+ {
+ //TODO: Load state from previously suspended application
+ }
- // Create a Frame to act navigation context and navigate to the first page
- auto rootFrame = ref new Frame();
- if (!rootFrame->Navigate(TypeName(MainPage::typeid)))
- {
- throw ref new FailureException("Failed to create initial page");
- }
+ // Create a Frame to act navigation context and navigate to the first page
+ auto rootFrame = ref new Frame();
+ if (!rootFrame->Navigate(TypeName(MainPage::typeid)))
+ {
+ throw ref new FailureException("Failed to create initial page");
+ }
- // Place the frame in the current Window and ensure that it is active
- Window::Current->Content = rootFrame;
- Window::Current->Activate();
+ // Place the frame in the current Window and ensure that it is active
+ Window::Current->Content = rootFrame;
+ Window::Current->Activate();
}
/// <summary>
@@ -76,8 +76,8 @@ void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEvent /// <param name="e">Details about the suspend request.</param>
void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
{
- (void) sender; // Unused parameter
- (void) e; // Unused parameter
+ (void) sender; // Unused parameter
+ (void) e; // Unused parameter
- //TODO: Save application state and stop any background activity
+ //TODO: Save application state and stop any background activity
}
diff --git a/cpp/test/WinRT/TestSuite/App.xaml.h b/cpp/test/WinRT/TestSuite/App.xaml.h index d7cd0e08434..4fd9ca3458b 100644 --- a/cpp/test/WinRT/TestSuite/App.xaml.h +++ b/cpp/test/WinRT/TestSuite/App.xaml.h @@ -9,16 +9,16 @@ namespace TestSuite
{
- /// <summary>
- /// Provides application-specific behavior to supplement the default Application class.
- /// </summary>
- ref class App sealed
- {
- public:
- App();
- virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
+ /// <summary>
+ /// Provides application-specific behavior to supplement the default Application class.
+ /// </summary>
+ ref class App sealed
+ {
+ public:
+ App();
+ virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
- private:
- void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
- };
+ private:
+ void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
+ };
}
diff --git a/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp index 6dc1c29aef2..c9f02fa6d24 100644 --- a/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp +++ b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp @@ -323,7 +323,7 @@ public: if(_test.server) { printLineToConsoleOutput("*** running test " + _test.name); - runClientServerTest(_test.server, _test.client); + runClientServerTest(_test.server, _test.client); printLineToConsoleOutput(""); } else @@ -454,7 +454,7 @@ MainPage::MainPage() void MainPage::OnNavigatedTo(NavigationEventArgs^ e) { - (void) e; // Unused parameter + (void) e; // Unused parameter } @@ -515,5 +515,5 @@ MainPage::runSelectedTest() TestRunnerPtr t = new TestRunner(allTest[TestList->SelectedIndex], config); t->start(); - t->getThreadControl().detach(); + t->getThreadControl().detach(); } diff --git a/cpp/test/WinRT/TestSuite/MainPage.xaml.h b/cpp/test/WinRT/TestSuite/MainPage.xaml.h index a49f4b546bc..096f8583fcc 100644 --- a/cpp/test/WinRT/TestSuite/MainPage.xaml.h +++ b/cpp/test/WinRT/TestSuite/MainPage.xaml.h @@ -28,7 +28,7 @@ public: void failed(Platform::String^ reason); protected: - + virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override; private: |