Merge pull request #87848 from nikitalita/natvis-cowdata-fix

Fix `godot.natvis` after CowData 64-bit promotion
This commit is contained in:
Rémi Verschelde 2024-02-02 12:05:39 +01:00
commit 99db7204dc
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -2,9 +2,9 @@
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="Vector&lt;*&gt;"> <Type Name="Vector&lt;*&gt;">
<Expand> <Expand>
<Item Name="[size]">_cowdata._ptr ? (((const unsigned int *)(_cowdata._ptr))[-1]) : 0</Item> <Item Name="[size]">_cowdata._ptr ? (((const unsigned long long *)(_cowdata._ptr))[-1]) : 0</Item>
<ArrayItems> <ArrayItems>
<Size>_cowdata._ptr ? (((const unsigned int *)(_cowdata._ptr))[-1]) : 0</Size> <Size>_cowdata._ptr ? (((const unsigned long long *)(_cowdata._ptr))[-1]) : 0</Size>
<ValuePointer>($T1 *) _cowdata._ptr</ValuePointer> <ValuePointer>($T1 *) _cowdata._ptr</ValuePointer>
</ArrayItems> </ArrayItems>
</Expand> </Expand>
@ -12,9 +12,9 @@
<Type Name="Array"> <Type Name="Array">
<Expand> <Expand>
<Item Name="[size]">_p->array._cowdata._ptr ? (((const unsigned int *)(_p->array._cowdata._ptr))[-1]) : 0</Item> <Item Name="[size]">_p->array._cowdata._ptr ? (((const unsigned long long *)(_p->array._cowdata._ptr))[-1]) : 0</Item>
<ArrayItems> <ArrayItems>
<Size>_p->array._cowdata._ptr ? (((const unsigned int *)(_p->array._cowdata._ptr))[-1]) : 0</Size> <Size>_p->array._cowdata._ptr ? (((const unsigned long long *)(_p->array._cowdata._ptr))[-1]) : 0</Size>
<ValuePointer>(Variant *) _p->array._cowdata._ptr</ValuePointer> <ValuePointer>(Variant *) _p->array._cowdata._ptr</ValuePointer>
</ArrayItems> </ArrayItems>
</Expand> </Expand>
@ -22,9 +22,9 @@
<Type Name="TypedArray&lt;*&gt;"> <Type Name="TypedArray&lt;*&gt;">
<Expand> <Expand>
<Item Name="[size]"> _p->array._cowdata._ptr ? (((const unsigned int *)(_p->array._cowdata._ptr))[-1]) : 0</Item> <Item Name="[size]"> _p->array._cowdata._ptr ? (((const unsigned long long *)(_p->array._cowdata._ptr))[-1]) : 0</Item>
<ArrayItems> <ArrayItems>
<Size>_p->array._cowdata._ptr ? (((const unsigned int *)(_p->array._cowdata._ptr))[-1]) : 0</Size> <Size>_p->array._cowdata._ptr ? (((const unsigned long long *)(_p->array._cowdata._ptr))[-1]) : 0</Size>
<ValuePointer >(Variant *) _p->array._cowdata._ptr</ValuePointer> <ValuePointer >(Variant *) _p->array._cowdata._ptr</ValuePointer>
</ArrayItems> </ArrayItems>
</Expand> </Expand>
@ -77,7 +77,7 @@
<Type Name="Vector&lt;StringName&gt;" IncludeView="NodePathHelper"> <Type Name="Vector&lt;StringName&gt;" IncludeView="NodePathHelper">
<Expand> <Expand>
<ArrayItems> <ArrayItems>
<Size>_cowdata._ptr ? (((const unsigned int *)(_cowdata._ptr))[-1]) : 0</Size> <Size>_cowdata._ptr ? (((const unsigned long long *)(_cowdata._ptr))[-1]) : 0</Size>
<ValuePointer>((StringName *)_cowdata._ptr),view(NodePathHelper)</ValuePointer> <ValuePointer>((StringName *)_cowdata._ptr),view(NodePathHelper)</ValuePointer>
</ArrayItems> </ArrayItems>
</Expand> </Expand>
@ -140,9 +140,9 @@
<Type Name="VMap&lt;*,*&gt;"> <Type Name="VMap&lt;*,*&gt;">
<Expand> <Expand>
<Item Condition="_cowdata._ptr" Name="[size]">*(reinterpret_cast&lt;int*&gt;(_cowdata._ptr) - 1)</Item> <Item Condition="_cowdata._ptr" Name="[size]">*(reinterpret_cast&lt;long long*&gt;(_cowdata._ptr) - 1)</Item>
<ArrayItems Condition="_cowdata._ptr"> <ArrayItems Condition="_cowdata._ptr">
<Size>*(reinterpret_cast&lt;int*&gt;(_cowdata._ptr) - 1)</Size> <Size>*(reinterpret_cast&lt;long long*&gt;(_cowdata._ptr) - 1)</Size>
<ValuePointer>reinterpret_cast&lt;VMap&lt;$T1,$T2&gt;::Pair*&gt;(_cowdata._ptr)</ValuePointer> <ValuePointer>reinterpret_cast&lt;VMap&lt;$T1,$T2&gt;::Pair*&gt;(_cowdata._ptr)</ValuePointer>
</ArrayItems> </ArrayItems>
</Expand> </Expand>