diff options
author | SupSuper | 2018-12-18 04:45:28 +0000 |
---|---|---|
committer | Filippos Karapetis | 2018-12-23 18:39:06 +0200 |
commit | 88b6959cb4a2114771d22b546f43cbdbae8f2419 (patch) | |
tree | ae1351a266cc4e3332099735f2ddc6a7bd7f13f9 /devtools/create_project | |
parent | f08e7a301241f0b17ad4362063abacdc1fd8a90b (diff) | |
download | scummvm-rg350-88b6959cb4a2114771d22b546f43cbdbae8f2419.tar.gz scummvm-rg350-88b6959cb4a2114771d22b546f43cbdbae8f2419.tar.bz2 scummvm-rg350-88b6959cb4a2114771d22b546f43cbdbae8f2419.zip |
MSVC: Fix HashMap visualisation showing dummy nodes
Diffstat (limited to 'devtools/create_project')
-rw-r--r-- | devtools/create_project/scripts/scummvm.natvis | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/devtools/create_project/scripts/scummvm.natvis b/devtools/create_project/scripts/scummvm.natvis index 995668690e..e305bea74a 100644 --- a/devtools/create_project/scripts/scummvm.natvis +++ b/devtools/create_project/scripts/scummvm.natvis @@ -10,8 +10,6 @@ * Lists appear to be infinite (the same elements repeat over and over again). Unfortunately, Lists don't store length information, and it's not possible to detect whether a Node is the last one by the Node itself. - - * In HashMaps, missing and dummy nodes are shown along with the useful ones. --> <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> @@ -56,13 +54,22 @@ <Item Name="[size]">_size</Item> <Item Name="[capacity]">_mask + 1</Item> <Item Name="[deleted]">_deleted</Item> - <IndexListItems> - <Size>_mask + 1</Size> - <ValueNode Condition="_storage[$i] && _storage[$i] != (Common::HashMap<$T1,$T2,$T3,$T4>::Node *)1">*_storage[$i]</ValueNode> - </IndexListItems> + <CustomListItems MaxItemsPerView="5000" ExcludeView="Test"> + <Variable Name="ctr" InitialValue="0" /> + <Size>_size</Size> + <Loop> + <Break Condition="ctr > _mask" /> + <Item Condition="_storage[ctr] > 1" Name="[{_storage[ctr]->_key}]">*_storage[ctr],view(MapHelper)</Item> + <Exec>ctr++</Exec> + </Loop> + </CustomListItems> </Expand> </Type> + <Type Name="Common::HashMap<*,*,*,*>::Node" IncludeView="MapHelper"> + <DisplayString>{_value}</DisplayString> + </Type> + <Type Name="Common::List<*>"> <DisplayString Condition="&_anchor == _anchor._next">{{ empty }}</DisplayString> <DisplayString Condition="&_anchor != _anchor._next">{{ non-empty }}</DisplayString> |