Skip to content

pass vectors by reference in getters#335

Merged
bashbaug merged 2 commits intoKhronosGroup:mainfrom
Richardk2n:main
Oct 1, 2025
Merged

pass vectors by reference in getters#335
bashbaug merged 2 commits intoKhronosGroup:mainfrom
Richardk2n:main

Conversation

@Richardk2n
Copy link
Contributor

closes #331

I do not think, the if(ptr) checks do anything that is not covered by the nullptr check already, but I kept them, because they were there.
However, in my opinion, they should probably be removed, given, they return CL_SUCCESS on failure.

I only wrote overloads for the getters.
This pattern also appears on two other functions and seemingly on everything related to Events.
I did not want to introduce too much code at once.

@CLAassistant
Copy link

CLAassistant commented Sep 30, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very nice improvement - thank you!

It'd be nice to have some tests for these overloads at some point, though the existing testing is fairly sparse / nonexistent...

@bashbaug bashbaug merged commit 51f1149 into KhronosGroup:main Oct 1, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question: Why pass pointers to vectors?

3 participants