Warnung C26471

Nicht reinterpret_cast verwenden. Eine Umwandlung von void* kann verwendet werden static_cast (type.1)

Hinweise

Codeanalysename: NO_REINTERPRET_CAST_FROM_VOID_PTR

Beispiel

void function(void* pValue)
{
    {
        int* pointerToInt = reinterpret_cast<int*>(pValue); // C26471, use static_cast instead
    }
    {
        int* pointerToInt = static_cast<int*>(pValue); // Good
    }
}

Siehe auch

C++ Core Guidelines Type.1