summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/SString.cpp10
-rw-r--r--ace/SString.h18
-rw-r--r--ace/SString.i12
3 files changed, 20 insertions, 20 deletions
diff --git a/ace/SString.cpp b/ace/SString.cpp
index 8817644b56c..772464ddb9a 100644
--- a/ace/SString.cpp
+++ b/ace/SString.cpp
@@ -272,8 +272,8 @@ ACE_CString::ACE_CString (const ACE_USHORT16 *s,
}
void
-ACE_CString::set (const char *s,
- size_t len,
+ACE_CString::set (size_t len,
+ const char *s,
int release)
{
// Free memory if necessary
@@ -781,7 +781,7 @@ ACE_WString::operator= (const ACE_WString &s)
// Check for identify.
if (this != &s)
- this->set (s.rep_, s.len_);
+ this->set (s.len_, s.rep_);
return *this;
}
@@ -789,11 +789,11 @@ ACE_WString::operator= (const ACE_WString &s)
void
ACE_WString::set (const ACE_USHORT16 *s)
{
- this->set (s, ACE_WString::strlen (s));
+ this->set (ACE_WString::strlen (s), s);
}
void
-ACE_WString::set (const ACE_USHORT16 *s, size_t len)
+ACE_WString::set (size_t len, const ACE_USHORT16 *s)
{
// Only reallocate if we don't have enough space...
if (this->len_ < len)
diff --git a/ace/SString.h b/ace/SString.h
index b5dff14a6f1..a917cee8666 100644
--- a/ace/SString.h
+++ b/ace/SString.h
@@ -82,18 +82,18 @@ public:
// Assignment operator (does copy memory).
void set (const char *s, int release = 1);
- // Copy <s>
+ // Copy <s> into this <ACE_CString>.
- void set (const char *s, size_t len, int release = 1);
- // Copy <len> bytes of <s> (will NUL terminate the result)
+ void set (size_t len, const char *s, int release = 1);
+ // Copy <len> bytes of <s> (will NUL terminate the result).
ACE_CString substring (size_t offset, ssize_t length = -1) const;
// Return a substring given an offset and length, if length == -1
// use rest of str return empty substring if offset or offset/length
- // are invalid
+ // are invalid.
ACE_CString substr (size_t offset, ssize_t length = -1) const;
- // Same as substring
+ // Same as <substring>.
ACE_CString &operator += (const ACE_CString &);
// Concat operator (copies memory).
@@ -113,7 +113,7 @@ public:
// if it has length 0!
const char *c_str (void) const;
- // Same as STL String's c_str()
+ // Same as STL String's <c_str> and <fast_rep>.
int strstr (const ACE_CString &s) const;
// Comparison operator that will match substrings. Returns the
@@ -254,7 +254,7 @@ public:
// Get the underlying pointer.
const char *c_str (void) const;
- // Get the underlying pointer.
+ // Same as STL String's <c_str> and <fast_rep>.
int strstr (const ACE_SString &s) const;
// Comparison operator that will match substrings. Returns the
@@ -371,7 +371,7 @@ public:
void set (const ACE_USHORT16 *s);
// Copy <s>
- void set (const ACE_USHORT16 *s, size_t len);
+ void set (size_t len, const ACE_USHORT16 *s);
// Copy <len> bytes of <s> (will NUL terminate the result)
ACE_WString substring (size_t offset, ssize_t length = -1) const;
@@ -401,7 +401,7 @@ public:
// Get at the underlying representation directly!
const ACE_USHORT16 *c_str (void) const;
- // Same as STL String's c_str()
+ // Same as STL String's <c_str> and <fast_rep>.
int strstr (const ACE_WString &s) const;
// Comparison operator that will match substrings. Returns the
diff --git a/ace/SString.i b/ace/SString.i
index 0a1583febd8..769970cfcde 100644
--- a/ace/SString.i
+++ b/ace/SString.i
@@ -36,7 +36,7 @@ ACE_CString::ACE_CString (const char *s,
else
length = 0;
- this->set (s, length, release);
+ this->set (length, s, release);
}
ACE_INLINE
@@ -49,7 +49,7 @@ ACE_CString::ACE_CString (char c,
{
ACE_TRACE ("ACE_CString::ACE_CString");
- this->set (&c, 1, 1);
+ this->set (1, &c, 1);
}
// Constructor that actually copies memory.
@@ -66,7 +66,7 @@ ACE_CString::ACE_CString (const char *s,
{
ACE_TRACE ("ACE_CString::ACE_CString");
- this->set (s, len, release);
+ this->set (len, s, release);
}
// Copy constructor.
@@ -80,7 +80,7 @@ ACE_CString::ACE_CString (const ACE_CString &s)
{
ACE_TRACE ("ACE_CString::ACE_CString");
- this->set (s.rep_, s.len_, 1);
+ this->set (s.len_, s.rep_, 1);
}
ACE_INLINE
@@ -106,7 +106,7 @@ ACE_CString::operator= (const ACE_CString &s)
// Check for identify.
if (this != &s)
- this->set (s.rep_, s.len_, 1);
+ this->set (s.len_, s.rep_, 1);
return *this;
}
@@ -120,7 +120,7 @@ ACE_CString::set (const char *s, int release)
else
length = 0;
- this->set (s, length, release);
+ this->set (length, s, release);
}
ACE_INLINE size_t