summaryrefslogtreecommitdiff
path: root/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp')
-rw-r--r--TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp
index bd1e6203b21..04f187eb814 100644
--- a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp
+++ b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp
@@ -1,6 +1,6 @@
#include "Echo_i.h"
-enum { BIG_LENGTH = 4 * 1024 };
+constexpr size_t BIG_LENGTH = 4 * 1024;
// Constructor.
@@ -9,24 +9,17 @@ Echo_i::Echo_i (CORBA::ORB_ptr o)
{
}
-// Destructor.
-
-Echo_i::~Echo_i ()
-{
-}
-
// Return a list of strings.
-
Echo::List *
Echo_i::return_list ()
{
Echo::List_var list;
{
- Echo::List *tmp = 0;
+ Echo::List *tmp {};
ACE_NEW_RETURN (tmp,
Echo::List (2),
- 0);
+ {});
list = tmp;
}
@@ -34,12 +27,11 @@ Echo_i::return_list ()
// Just do something to get a 'big' list of strings.
CORBA::Char big[BIG_LENGTH + 1];
- for (int i = 0; i < BIG_LENGTH; ++i)
+ for (size_t i = 0; i < BIG_LENGTH; ++i)
big[i] = 'A';
big[BIG_LENGTH] = 0;
- CORBA::Char small[] = "Hello World";
list[CORBA::ULong(0)] = CORBA::string_dup(big);
- list[CORBA::ULong(1)] = CORBA::string_dup(small);
+ list[CORBA::ULong(1)] = CORBA::string_dup("Hello World");
return list._retn ();
}
@@ -50,10 +42,10 @@ Echo_i::return_wlist ()
Echo::WList_var list;
{
- Echo::WList *tmp = 0;
+ Echo::WList *tmp {};
ACE_NEW_RETURN (tmp,
Echo::WList (2),
- 0);
+ {});
list = tmp;
}
@@ -61,11 +53,11 @@ Echo_i::return_wlist ()
// Just do something to get a 'big' list of wide strings.
CORBA::WChar big[BIG_LENGTH + 1];
- for (int i = 0; i < BIG_LENGTH; ++i)
+ for (size_t i = 0; i < BIG_LENGTH; ++i)
big[i] = 'A';
big[BIG_LENGTH] = 0;
CORBA::WChar small[17 + 1];
- for (int i = 0; i < 17; ++i)
+ for (size_t i = 0; i < 17; ++i)
small[i] = 'B';
small[17] = 0;
list[CORBA::ULong(0)] = CORBA::wstring_dup(big);
@@ -77,7 +69,7 @@ Echo_i::return_wlist ()
// Shutdown the server application.
void
-Echo_i::shutdown (void)
+Echo_i::shutdown ()
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("\nThe echo server is shutting down\n")));