Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

ofParameter and addListener confusion

$
0
0

Hey all, I have this use case:

ofParameter<bool> b;
void changedB(bool& val);

Now I can do the following:

b.addListener(this, &ofApp::changedB);

but I can't call the same function using the parameter:

changedB(b);
changedB(b.get());

I have to do this:

bool b2 = b;
changedB(b2);

Am I missing something?


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>