Use typedefs throughout the string code. r=dbaron, sr=scc

git-svn-id: svn://10.0.0.236/trunk@105374 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jaggernaut%netscape.com
2001-10-13 15:01:21 +00:00
parent 1088aa8aea
commit 39042c626f
42 changed files with 780 additions and 714 deletions

View File

@@ -27,30 +27,30 @@
// #include "nsBufferHandleUtils.h"
void
nsSharableString::assign( const string_type& aReadable )
nsSharableString::assign( const abstract_string_type& aReadable )
{
const nsSharedBufferHandle<char_type>* handle = aReadable.GetSharedBufferHandle();
const shared_buffer_handle_type* handle = aReadable.GetSharedBufferHandle();
if ( !handle )
handle = NS_AllocateContiguousHandleWithData(handle, aReadable, PRUint32(1));
mBuffer = handle;
}
const nsSharedBufferHandle<PRUnichar>*
const nsSharableString::shared_buffer_handle_type*
nsSharableString::GetSharedBufferHandle() const
{
return mBuffer.get();
}
void
nsSharableCString::assign( const string_type& aReadable )
nsSharableCString::assign( const abstract_string_type& aReadable )
{
const nsSharedBufferHandle<char_type>* handle = aReadable.GetSharedBufferHandle();
const shared_buffer_handle_type* handle = aReadable.GetSharedBufferHandle();
if ( !handle )
handle = NS_AllocateContiguousHandleWithData(handle, aReadable, PRUint32(1));
mBuffer = handle;
}
const nsSharedBufferHandle<char>*
const nsSharableCString::shared_buffer_handle_type*
nsSharableCString::GetSharedBufferHandle() const
{
return mBuffer.get();