mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 18:43:48 +00:00
chore(Deps/Acelite): Update to 6.5.10 (#3450)
This commit is contained in:
72
deps/acelite/ace/Codeset_IBM1047.cpp
vendored
72
deps/acelite/ace/Codeset_IBM1047.cpp
vendored
@@ -119,6 +119,42 @@ ACE_IBM1047_ISO8859::read_string (ACE_InputCDR& in,
|
||||
return 0;
|
||||
}
|
||||
|
||||
ACE_CDR::Boolean
|
||||
ACE_IBM1047_ISO8859::read_string (ACE_InputCDR& in,
|
||||
std::string & x)
|
||||
{
|
||||
#if defined (ACE_HAS_CPP11)
|
||||
ACE_CDR::ULong len;
|
||||
|
||||
in.read_ulong (len);
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
x.resize (len);
|
||||
}
|
||||
catch (const std::bad_alloc&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->read_char_array (in, &x[0], len))
|
||||
{
|
||||
x.resize (len-1); // drop terminating '\0' read from stream
|
||||
return true;
|
||||
}
|
||||
|
||||
delete [] x;
|
||||
}
|
||||
|
||||
x.clear ();
|
||||
return false;
|
||||
#else
|
||||
return this->ACE_Char_Codeset_Translator::read_string (in, x);
|
||||
#endif
|
||||
}
|
||||
|
||||
ACE_CDR::Boolean
|
||||
ACE_IBM1047_ISO8859::read_char_array (ACE_InputCDR& in,
|
||||
ACE_CDR::Char* x,
|
||||
@@ -236,6 +272,42 @@ ACE_ISO8859_IBM1047::read_string (ACE_InputCDR &in,
|
||||
return 0;
|
||||
}
|
||||
|
||||
ACE_CDR::Boolean
|
||||
ACE_ISO8859_IBM1047::read_string (ACE_InputCDR& in,
|
||||
std::string & x)
|
||||
{
|
||||
#if defined (ACE_HAS_CPP11)
|
||||
ACE_CDR::ULong len;
|
||||
|
||||
in.read_ulong (len);
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
x.resize (len);
|
||||
}
|
||||
catch (const std::bad_alloc&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->read_char_array (in, &x[0], len))
|
||||
{
|
||||
x.resize (len-1); // drop terminating '\0' read from stream
|
||||
return true;
|
||||
}
|
||||
|
||||
delete [] x;
|
||||
}
|
||||
|
||||
x.clear ();
|
||||
return false;
|
||||
#else
|
||||
return this->ACE_Char_Codeset_Translator::read_string (in, x);
|
||||
#endif
|
||||
}
|
||||
|
||||
ACE_CDR::Boolean
|
||||
ACE_ISO8859_IBM1047::read_char_array (ACE_InputCDR &in,
|
||||
ACE_CDR::Char *x,
|
||||
|
||||
Reference in New Issue
Block a user