Author: faridz
Date: Tue Mar 18 07:10:03 2008
New Revision: 638370
URL: http://svn.apache.org/viewvc?rev=638370&view=rev
Log:
2008-03-18 Farid Zaripov <[EMAIL PROTECTED]>
* src/podarray.h (_C_length): New method to calculate the length of the
pod array.
(__rw_pod_array): Use _C_length() instead of char_traits<>::length().
(acquire): Ditto.
(append): Ditto.
(assign): Ditto.
Modified:
stdcxx/trunk/src/podarray.h
Modified: stdcxx/trunk/src/podarray.h
URL:
http://svn.apache.org/viewvc/stdcxx/trunk/src/podarray.h?rev=638370&r1=638369&r2=638370&view=diff
==============================================================================
--- stdcxx/trunk/src/podarray.h (original)
+++ stdcxx/trunk/src/podarray.h Tue Mar 18 07:10:03 2008
@@ -90,7 +90,7 @@
}
_EXPLICIT __rw_pod_array (const _TypeT *__a)
- : _C_len (_STD::char_traits<_TypeT>::length (__a))
+ : _C_len (_C_length (__a))
// , _C_pbuf (_C_len < _Size ? _C_buffer : new _TypeT [_C_len + 1])
{
// initialze _C_pbuf here in order to prevent HP aCC 3.70
@@ -147,7 +147,7 @@
}
_TypeT* acquire (_TypeT *__a) {
- return acquire (__a, _STD::char_traits<_TypeT>::length (__a));
+ return acquire (__a, _C_length (__a));
}
_TypeT* release () {
@@ -168,7 +168,7 @@
__rw_pod_array& append (const _TypeT *__a) {
_RWSTD_ASSERT (__a);
- return append (__a, _STD::char_traits<_TypeT>::length (__a));
+ return append (__a, _C_length (__a));
}
__rw_pod_array& operator+= (const _TypeT *__a) {
@@ -183,7 +183,7 @@
__rw_pod_array& assign (const _TypeT *__a) {
_RWSTD_ASSERT (__a);
- return assign (__a, _STD::char_traits<_TypeT>::length (__a));
+ return assign (__a, _C_length (__a));
}
__rw_pod_array& operator= (const _TypeT *__a) {
@@ -193,6 +193,12 @@
__rw_pod_array& operator= (const __rw_pod_array &__rhs) {
return assign (__rhs._C_pbuf, __rhs._C_len);
+ }
+
+private:
+
+ static _RWSTD_SIZE_T _C_length (const _TypeT *__a) {
+ return _STD::char_traits<_TypeT>::length (__a);
}
};