summaryrefslogtreecommitdiff
path: root/ACE/ace/SString.h
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-03-09 11:49:28 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-03-09 11:49:28 +0100
commit3a135b20e2c3c3dd407b9b768a411645eca6a7e0 (patch)
tree71301b1d02a56c2137c4e4c1b378aea4acd139a7 /ACE/ace/SString.h
parent199259c5d2d5f4a6550382a683f5d54ac482fcd1 (diff)
downloadATCD-3a135b20e2c3c3dd407b9b768a411645eca6a7e0.tar.gz
Various cleanup and use of C++11 features
Diffstat (limited to 'ACE/ace/SString.h')
-rw-r--r--ACE/ace/SString.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/ACE/ace/SString.h b/ACE/ace/SString.h
index 2d599c6e54a..81651b78dbb 100644
--- a/ACE/ace/SString.h
+++ b/ACE/ace/SString.h
@@ -59,39 +59,40 @@ public:
using ACE_WString::size_type;
/// Default constructor.
- ACE_NS_WString (ACE_Allocator *alloc = 0);
+ ACE_NS_WString (ACE_Allocator *alloc = nullptr);
/// Constructor that copies @a s into dynamically allocated memory.
ACE_NS_WString (const char *s,
- ACE_Allocator *alloc = 0);
+ ACE_Allocator *alloc = nullptr);
/// Constructor that copies @a s into dynamically allocated memory.
ACE_NS_WString (const ACE_WSTRING_TYPE *s,
- ACE_Allocator *alloc = 0);
+ ACE_Allocator *alloc = nullptr);
#if defined (ACE_WSTRING_HAS_USHORT_SUPPORT)
/// Constructor that takes in a ushort16 string (mainly used by the
/// ACE Name_Space classes)
ACE_NS_WString (const ACE_UINT16 *s,
size_type len,
- ACE_Allocator *alloc = 0);
+ ACE_Allocator *alloc = nullptr);
#endif /* ACE_WSTRING_HAS_USHORT_SUPPORT */
/// Constructor that copies @a len ACE_WSTRING_TYPE's of @a s into dynamically
/// allocated memory (will NUL terminate the result).
ACE_NS_WString (const ACE_WSTRING_TYPE *s,
size_type len,
- ACE_Allocator *alloc = 0);
+ ACE_Allocator *alloc = nullptr);
/// Constructor that dynamically allocates memory for @a len + 1
/// ACE_WSTRING_TYPE characters. The newly created memory is set memset to 0.
- ACE_NS_WString (size_type len, ACE_Allocator *alloc = 0);
+ ACE_NS_WString (size_type len, ACE_Allocator *alloc = nullptr);
/// Copy constructor.
- ACE_NS_WString (const ACE_NS_WString &s);
+ ACE_NS_WString (const ACE_NS_WString &s) = default;
+ ACE_NS_WString &operator= (const ACE_NS_WString&) = default;
/// Constructor that copies @a c into dynamically allocated memory.
- ACE_NS_WString (ACE_WSTRING_TYPE c, ACE_Allocator *alloc = 0);
+ ACE_NS_WString (ACE_WSTRING_TYPE c, ACE_Allocator *alloc = nullptr);
/// Transform into a copy of the ASCII character representation.
/// (caller must delete)
@@ -136,20 +137,20 @@ public:
static const size_type npos;
/// Default constructor.
- ACE_SString (ACE_Allocator *alloc = 0);
+ ACE_SString (ACE_Allocator *alloc = nullptr);
/// Constructor that copies @a s into dynamically allocated memory.
- ACE_SString (const char *s, ACE_Allocator *alloc = 0);
+ ACE_SString (const char *s, ACE_Allocator *alloc = nullptr);
/// Constructor that copies @a len chars of @a s into dynamically
/// allocated memory (will NUL terminate the result).
- ACE_SString (const char *s, size_type len, ACE_Allocator *alloc = 0);
+ ACE_SString (const char *s, size_type len, ACE_Allocator *alloc = nullptr);
/// Copy constructor.
ACE_SString (const ACE_SString &);
/// Constructor that copies @a c into dynamically allocated memory.
- ACE_SString (char c, ACE_Allocator *alloc = 0);
+ ACE_SString (char c, ACE_Allocator *alloc = nullptr);
/// Default destructor.
~ACE_SString ();