summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstorri <storri@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-10-20 17:15:14 +0000
committerstorri <storri@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-10-20 17:15:14 +0000
commit6afbe8b7e17c5ce58db1295a3d51940b25067c17 (patch)
treeedb25feae5c66174eca0d61a687f8fae31927dd2
parent2a7d7c69a82a02431410cd40f63312163661caf9 (diff)
downloadATCD-6afbe8b7e17c5ce58db1295a3d51940b25067c17.tar.gz
*** empty log message ***
-rw-r--r--ace/String_Base.i35
1 files changed, 18 insertions, 17 deletions
diff --git a/ace/String_Base.i b/ace/String_Base.i
index 4edc5206835..ac886250dc9 100644
--- a/ace/String_Base.i
+++ b/ace/String_Base.i
@@ -202,6 +202,24 @@ ACE_String_Base<CHAR>::c_str (void) const
return this->rep_;
}
+template <class CHAR> ACE_INLINE int
+ACE_String_Base<CHAR>::compare (const ACE_String_Base<CHAR> &s) const
+{
+ ACE_TRACE ("ACE_String_Base<CHAR>::compare");
+
+ // Pick smaller of the two lengths and perform the comparison.
+ size_t smaller_length = ace_min (this->len_, s.len_);
+
+ int result = ACE_OS::memcmp (this->rep_,
+ s.rep_,
+ smaller_length);
+
+ if (!result)
+ result = this->len_ - s.len_;
+ return result;
+}
+
+
// Comparison operator.
template <class CHAR> ACE_INLINE int
@@ -240,23 +258,6 @@ ACE_String_Base<CHAR>::operator!= (const ACE_String_Base<CHAR> &s) const
return !(*this == s);
}
-template <class CHAR> ACE_INLINE int
-ACE_String_Base<CHAR>::compare (const ACE_String_Base<CHAR> &s) const
-{
- ACE_TRACE ("ACE_String_Base<CHAR>::compare");
-
- // Pick smaller of the two lengths and perform the comparison.
- size_t smaller_length = ace_min (this->len_, s.len_);
-
- int result = ACE_OS::memcmp (this->rep_,
- s.rep_,
- smaller_length);
-
- if (!result)
- result = this->len_ - s.len_;
- return result;
-}
-
template <class CHAR> ACE_INLINE ssize_t
ACE_String_Base<CHAR>::find (const CHAR *s, size_t pos) const
{