mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 09:21:03 +00:00
ICU-11032 call udata_getMemory() rather than reading internal structures
X-SVN-Rev: 36473
This commit is contained in:
parent
3415c2e9ca
commit
30780ccadc
1 changed files with 3 additions and 5 deletions
|
@ -15,7 +15,6 @@
|
|||
#include "cstring.h"
|
||||
#include "identifier_info.h"
|
||||
#include "scriptset.h"
|
||||
#include "udatamem.h"
|
||||
#include "umutex.h"
|
||||
#include "udataswp.h"
|
||||
#include "uassert.h"
|
||||
|
@ -531,10 +530,9 @@ SpoofData::SpoofData(UDataMemory *udm, UErrorCode &status)
|
|||
return;
|
||||
}
|
||||
fUDM = udm;
|
||||
const DataHeader *dh = udm->pHeader;
|
||||
int32_t headerSize = dh->dataHeader.headerSize;
|
||||
fRawData = reinterpret_cast<SpoofDataHeader *>
|
||||
((char *)dh + headerSize);
|
||||
// fRawData is non-const because it may be constructed by the data builder.
|
||||
fRawData = reinterpret_cast<SpoofDataHeader *>(
|
||||
const_cast<void *>(udata_getMemory(udm)));
|
||||
validateDataVersion(fRawData, status);
|
||||
initPtrs(status);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue