OpenXR-Hpp
OpenXR-Hpp copied to clipboard
```enumerateInstanceExtensionPropertiesToVector``` redundant assert
enumerateInstanceExtensionPropertiesToVector can be usefull to check whether openXR libraries are installed on user's PC. Like this:
!xr::enumerateInstanceExtensionPropertiesToVector(nullptr).empty();
But the assert inside ruins this solution and the same logic, so an option using more lines of code is commonly used:
uint32_t property_count = 0;
auto result = xr::enumerateInstanceExtensionProperties(nullptr, 0, &property_count, nullptr);
return XR_SUCCEEDED(result) && property_count != 0;
The suggestion is to remove redundant assert
It seems that the real problem in all the *ToVector functions implemantation is using assert on error instead of throwing exception.