Skip to content

Commit 57d909c

Browse files
authored
Merge pull request #2440 from jwillemsen/jwi-tests
Fixed test output, use nullptr/delete, fixed typo in comments
2 parents de56bf3 + bb2d699 commit 57d909c

12 files changed

Lines changed: 33 additions & 33 deletions

File tree

ACE/tests/Time_Value_Test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ int test_year_month (const ACE_Time_Value& time, long year, long month)
6262
if (dt.year () != year)
6363
{
6464
ACE_ERROR ((LM_ERROR,
65-
ACE_TEXT ("time year should be %d not %d\n"), dt.year (), year));
65+
ACE_TEXT ("time year should be %d not %d\n"), year, dt.year ()));
6666
++ret;
6767
}
6868
else
@@ -73,7 +73,7 @@ int test_year_month (const ACE_Time_Value& time, long year, long month)
7373
if (dt.month () != month)
7474
{
7575
ACE_ERROR ((LM_ERROR,
76-
ACE_TEXT ("time month should be %d not %d\n"), dt.month (), month));
76+
ACE_TEXT ("time month should be %d not %d\n"), month, dt.month ()));
7777
++ret;
7878
}
7979
else

TAO/tao/DynamicAny/DynAnyUtils_T.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ namespace TAO
113113
ANY_TC any_tc,
114114
CORBA::Boolean allow_truncation)
115115
{
116-
DA_IMPL *p = 0;
116+
DA_IMPL *p = nullptr;
117117
ACE_NEW_THROW_EX (p,
118118
DA_IMPL (allow_truncation),
119119
CORBA::NO_MEMORY ());
@@ -128,7 +128,7 @@ namespace TAO
128128
// Currently only TAO_DynValue_i can throw the original (duplicate
129129
// of a previously found TAO_DynValue_i). The new BLANK one created
130130
// above on which we called init() will be deleted automatically by
131-
// the ACE_Auto_Basic_Ptr.
131+
// the std::unique_ptr.
132132
return original;
133133
}
134134

@@ -142,7 +142,7 @@ namespace TAO
142142
ANY_TC any_tc,
143143
CORBA::Boolean allow_truncation)
144144
{
145-
DA_IMPL *p = 0;
145+
DA_IMPL *p = nullptr;
146146
ACE_NEW_THROW_EX (p,
147147
DA_IMPL (allow_truncation),
148148
CORBA::NO_MEMORY ());
@@ -157,7 +157,7 @@ namespace TAO
157157
// Currently only TAO_DynValue_i can throw the original (duplicate
158158
// of a previously found TAO_DynValue_i). The new BLANK one created
159159
// above on which we called init() will be deleted automatically by
160-
// the ACE_Auto_Basic_Ptr.
160+
// the std::unique_ptr.
161161
return original;
162162
}
163163

TAO/tao/DynamicAny/DynAny_i.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class TAO_DynamicAny_Export TAO_DynAny_i
7777
void init_common ();
7878

7979
// Use copy() or assign() instead of these.
80-
TAO_DynAny_i (const TAO_DynAny_i &src);
81-
TAO_DynAny_i &operator= (const TAO_DynAny_i &src);
80+
TAO_DynAny_i (const TAO_DynAny_i &src) = delete;
81+
TAO_DynAny_i &operator= (const TAO_DynAny_i &src) = delete;
8282
};
8383

8484
TAO_END_VERSIONED_NAMESPACE_DECL

TAO/tao/DynamicAny/DynArray_i.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ class TAO_DynamicAny_Export TAO_DynArray_i
8989
void init_common ();
9090

9191
// Use copy() or assign() instead of these.
92-
TAO_DynArray_i (const TAO_DynArray_i &src);
93-
TAO_DynArray_i &operator= (const TAO_DynArray_i &src);
92+
TAO_DynArray_i (const TAO_DynArray_i &src) = delete;
93+
TAO_DynArray_i &operator= (const TAO_DynArray_i &src) = delete;
9494

9595
private:
9696
/// Each component is also a DynAny.

TAO/tao/DynamicAny/DynEnum_i.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ class TAO_DynamicAny_Export TAO_DynEnum_i
8383
void init_common ();
8484

8585
// = Use copy() or assign() instead of these.
86-
TAO_DynEnum_i (const TAO_DynEnum_i &src);
87-
TAO_DynEnum_i &operator= (const TAO_DynEnum_i &src);
86+
TAO_DynEnum_i (const TAO_DynEnum_i &src) = delete;
87+
TAO_DynEnum_i &operator= (const TAO_DynEnum_i &src) = delete;
8888

8989
private:
9090
/// Current numeric value of the enum.

TAO/tao/DynamicAny/DynStruct_i.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ class TAO_DynamicAny_Export TAO_DynStruct_i
9494
void init_common ();
9595

9696
// = Use copy() or assign() instead of these.
97-
TAO_DynStruct_i (const TAO_DynStruct_i &src);
98-
TAO_DynStruct_i &operator= (const TAO_DynStruct_i &src);
97+
TAO_DynStruct_i (const TAO_DynStruct_i &src) = delete;
98+
TAO_DynStruct_i &operator= (const TAO_DynStruct_i &src) = delete;
9999

100100
private:
101101
/// Each component is also a DynAny.

TAO/tao/DynamicAny/DynUnion_i.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ class TAO_DynamicAny_Export TAO_DynUnion_i
9999
const CORBA::Any &other_any);
100100

101101
/// Use copy() or assign() instead of these.
102-
TAO_DynUnion_i (const TAO_DynUnion_i &src);
103-
TAO_DynUnion_i &operator= (const TAO_DynUnion_i &src);
102+
TAO_DynUnion_i (const TAO_DynUnion_i &src) = delete;
103+
TAO_DynUnion_i &operator= (const TAO_DynUnion_i &src) = delete;
104104

105105
private:
106106
/// Just two components.

TAO/tao/DynamicAny/DynValueBox_i.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class TAO_DynamicAny_Export TAO_DynValueBox_i
8282
void set_from_any (const CORBA::Any &any);
8383

8484
// = Use copy() or assign() instead of these.
85-
TAO_DynValueBox_i (const TAO_DynValueBox_i &src);
86-
TAO_DynValueBox_i &operator= (const TAO_DynValueBox_i &src);
85+
TAO_DynValueBox_i (const TAO_DynValueBox_i &src) = delete;
86+
TAO_DynValueBox_i &operator= (const TAO_DynValueBox_i &src) = delete;
8787

8888
/// The boxed component of DynValueBox is another DynAny.
8989
DynamicAny::DynAny_var boxed_;

TAO/tao/DynamicAny/DynValueCommon_i.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TAO_DynamicAny_Export TAO_DynValueCommon_i
3636
{
3737
public:
3838
/// Constructor.
39-
TAO_DynValueCommon_i (CORBA::Boolean allow_truncation=true);
39+
TAO_DynValueCommon_i (CORBA::Boolean allow_truncation = true);
4040

4141
/// Destructor.
4242
~TAO_DynValueCommon_i ();
@@ -56,8 +56,8 @@ class TAO_DynamicAny_Export TAO_DynValueCommon_i
5656

5757
private:
5858
// = Use copy() or assign() instead of these.
59-
TAO_DynValueCommon_i (const TAO_DynValueCommon_i &src);
60-
TAO_DynValueCommon_i &operator= (const TAO_DynValueCommon_i &src);
59+
TAO_DynValueCommon_i (const TAO_DynValueCommon_i &src) = delete;
60+
TAO_DynValueCommon_i &operator= (const TAO_DynValueCommon_i &src) = delete;
6161

6262
/// Check if the typecode is acceptable. Needs to be provided by DynValue or DynValueBox
6363
virtual void check_typecode (CORBA::TypeCode_ptr tc)=0;

TAO/tao/DynamicAny/DynValue_i.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ TAO_DynValue_i::init_helper (CORBA::TypeCode_ptr tc)
9191
this->type_ = CORBA::TypeCode::_duplicate (tc);
9292

9393
// Work out how many total members and types there
94-
// are in total in this derived->base hiarchy.
94+
// are in total in this derived->base hierarchy.
9595

9696
get_base_types (
9797
tc,
@@ -1038,7 +1038,7 @@ TAO_DynValue_i::from_inputCDR (TAO_InputCDR &strm)
10381038
}
10391039

10401040
// Work out how many total types there
1041-
// are in this derived->base hiarchy.
1041+
// are in this derived->base hierarchy.
10421042
const CORBA::ULong
10431043
num_fields = static_cast <CORBA::ULong> (this->da_members_.size ()),
10441044
num_ids = static_cast <CORBA::ULong> (ids.size ());

0 commit comments

Comments
 (0)