mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Some missing from merge.
Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
parent
ec939a5bce
commit
f4be15a7af
1895 changed files with 160408 additions and 53601 deletions
|
|
@ -1,9 +1,12 @@
|
|||
// $Id: String_Base.cpp 93238 2011-02-01 14:30:38Z shuston $
|
||||
|
||||
#ifndef ACE_STRING_BASE_CPP
|
||||
#define ACE_STRING_BASE_CPP
|
||||
|
||||
#include "ace/ACE.h"
|
||||
#include "ace/Malloc_Base.h"
|
||||
#include "ace/String_Base.h"
|
||||
#include "ace/Auto_Ptr.h"
|
||||
#include "ace/OS_NS_string.h"
|
||||
|
||||
#include <algorithm> // For std::swap<>
|
||||
|
|
@ -14,7 +17,7 @@
|
|||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_ALLOC_HOOK_DEFINE_Tc(ACE_String_Base)
|
||||
ACE_ALLOC_HOOK_DEFINE(ACE_String_Base)
|
||||
|
||||
template <class ACE_CHAR_T>
|
||||
ACE_CHAR_T ACE_String_Base<ACE_CHAR_T>::NULL_String_ = 0;
|
||||
|
|
@ -370,11 +373,7 @@ ACE_String_Base<ACE_CHAR_T>::rep (void) const
|
|||
ACE_TRACE ("ACE_String_Base<ACE_CHAR_T>::rep");
|
||||
|
||||
ACE_CHAR_T *new_string;
|
||||
#if defined (ACE_HAS_ALLOC_HOOKS)
|
||||
ACE_ALLOCATOR_RETURN (new_string, static_cast<ACE_CHAR_T*>(ACE_Allocator::instance()->malloc(sizeof(ACE_CHAR_T) * (this->len_ + 1))), 0);
|
||||
#else
|
||||
ACE_NEW_RETURN (new_string, ACE_CHAR_T[this->len_ + 1], 0);
|
||||
#endif
|
||||
ACE_OS::strsncpy (new_string, this->rep_, this->len_+1);
|
||||
|
||||
return new_string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue