1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0024535: Bad type cast in TDocStd_Document::Update()

Eliminating of GCC compiler warning on breakage of C pointer aliasing rules.
This commit is contained in:
szy 2014-03-26 16:49:44 +04:00 committed by abv
parent e02a6a7242
commit d347054cd0

View File

@ -224,8 +224,8 @@ void TDocStd_Document::Update(const Handle(CDM_Document)& /*aToDocument*/,
const Standard_Integer aReferenceIdentifier,
const Standard_Address aModifContext)
{
const TDocStd_Context CC = *((TDocStd_Context *)&aModifContext);
if (CC.ModifiedReferences() || !IsUpToDate(aReferenceIdentifier)) {
const TDocStd_Context* CC = static_cast<TDocStd_Context*> (aModifContext);
if (CC->ModifiedReferences() || !IsUpToDate(aReferenceIdentifier)) {
TCollection_AsciiString aDocEntry(aReferenceIdentifier);
UpdateReferences(aDocEntry);
SetIsUpToDate(aReferenceIdentifier);