The first update to Visual Assist for 2023 is here. This update features an extensive list of improvements and bug fixes for a variety of users. And if you haven’t, download the latest release here. We hope you find them useful!
Table of Contents
Improved parser auto type deduction for pointers
This release updates how Visual Assist handles auto type specifiers, particularly when reference is coming from a pointer. Previously, there was a change that when auto assignments are used, any flags (such as const) may be ignored. With this release, VA now has better pointer deduction avoiding such instances.
Parser support C# tuple deconstruction
This update is useful for those using the C# equivalent of the previously released tuple deconstruction for C++ to avoid verbose initialization of variables.
What this update does is that when you assign multiple variables at once using a predefined struct, VA will be able to recognize those variables. Consequently, this allows its features such as syntax highlighting and navigations to function properly.
Add parser support for C++ 17’s structured binding from a constructor
This is a simple fix for an edge case for structured bindings that happens when a constructor is used. Similar to the last fix on tuple deconstruction, what this update does is that when you use the auto function to assign variables from a struct, it will now function properly even when a constructor is called.
Support for custom shader file extensions
When we added shader language and HLSL support, one of the most prominent user requests was to be able to enable support for non-standard/custom shader extensions.
Better code formatting and behavior for Unreal Engine copy-paste
Users can recall that when typing Unreal-specific code, there is unintended indentation behavior as a result of VS not understanding UE specifiers such as UFUNCTION and UMACROS.
With Visual Assist enabled, the automatic indentation present in default Visual Studio is disabled. And in this release, we’ve improved on this behavior by extending it to copy-paste. What this means is that when copying or cutting blocks of Unreal Engine code, the pasted code will still have the correct indentation in place.
New UI in Find References results
Previously, when using find references, the default scope of the search was the currently opened project or file. This update is for those who found that results shown by find references seem to be incomplete— it is now more apparent that you have the option to specify the scope of the search (ie. just the open project or the entire solution).
Code inspections for bugprone-inaccurate-erase and bugprone-bool-pointer-implicit-conversion
Lastly, we’ve added two new code inspections based on clang tidy for bugprone-inaccurate-erase and bugprone-bool-pointer-implicit-conversion.
The first one is useful if you use std::vector and you are using remove() or erase() which often uses hard to read/type syntax. This inspection makes sure that when you use erase(), it works properly.
The second one is useful when you have a pointer as an argument to an if statement (or anything resembling a bool). This is because it has to be dereferenced first or else it will default to a True. This check notifies the user if the pointer has not been dereferenced.
Both of these checks are useful because in both of these instances, the code will still compile successfully—giving a false impression that everything would work as intended.
Bug Fixes
We also have a couple of bug fixes. And although they are small bugs, we hope this would be beneficial to users who encountered problems around the following:
- Fixed issue where icons may be missing in Visual Studio 2022.
- Fixed issue where folders / JSON files may be unnecessarily created when hovering the mouse cursor over symbols.
- Fixed convert suggestion listbox keyboard shortcut display to update when the shortcut is changed. Note: shortcuts shown are now dynamic.
Keep the reports coming. Send us a message or start a thread on the user forums for bug reports or suggestions. Happy coding!