KhronosGroup / KhronosGroup/OpenXR-Hpp

```enumerateInstanceExtensionPropertiesToVector``` redundant assert

Open
#52 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
50
Forks
23
PR merge metrics
No merged PRs in 30d

Description

```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

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate enumerateInstanceExtensionPropertiesToVector and inspect the assertion that prevents checking whether OpenXR libraries are installed through an empty-result query. Compare its behavior with enumerateInstanceExtensionProperties and verify that the vector helper no longer asserts for this use case; the issue is done when the suggested check can be used without the redundant assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
ar-vr-xr
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.