object: briefly comment the enumerate method
This commit is contained in:
parent
b2702d994d
commit
0a84a4ebb3
@ -77,13 +77,16 @@ VK_INSTANTIATED_TYPE_MAP (INSTANTIATED)
|
||||
template <typename T>
|
||||
std::vector<T>
|
||||
cruft::vk::enumerated<T>::find (const instance &inst) {
|
||||
// find the total number of objects
|
||||
uint32_t expected = 0;
|
||||
error::try_code (enum_traits<T>::enumerate (inst.id (), &expected, nullptr));
|
||||
|
||||
// allocate an array of handles and fetch them
|
||||
uint32_t found = expected;
|
||||
typename T::id_t handles[expected];
|
||||
error::try_code (enum_traits<T>::enumerate (inst.id (), &found, handles));
|
||||
|
||||
// return an collection of objects from the handles
|
||||
return std::vector<T> (handles, handles + found);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user