Skip to content

enumerateInstanceExtensionPropertiesToVector redundant assert #52

Description

@gosha-krovsh

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions