Skip to content

Conversation

@artificiel
Copy link
Contributor

for better const behaviour

@artificiel artificiel mentioned this pull request Aug 16, 2023
77 tasks
@ofTheo
Copy link
Member

ofTheo commented Aug 16, 2023

Hi @artificiel - thank you for this.

Is it possible to explain what bug / issue this is fixing and what behavior changes this results in?

@artificiel
Copy link
Contributor Author

  1. the init value was not initialized when creating an “empty” ofParameter. It’s an edge case as in general of parameters are to be set before use but the uninitialized field was then RAM noise under some compilers/platforms. Change is that init it is now properly initialized (to the min value of the type) in that edge case.

  2. within the reinit method implementation, the direct set message does not compile in const enumeration; setmethod (the underlying “effective” method) allows it. Change is that it now compiles and works as expected.

@ofTheo
Copy link
Member

ofTheo commented Aug 17, 2023

Awesome - thank you for clarifying.
Sounds great.

@ofTheo ofTheo merged commit 6add96b into openframeworks:master Aug 17, 2023
danoli3 added a commit to danoli3/openFrameworks that referenced this pull request Aug 21, 2023
…fixes

* commit '11cdc79a94d3a795020ca7a26b082b95e5989a29':
  macOS GLFW - no shadow when fullscreen (openframeworks#7605)
  initGrabber -> setup (openframeworks#7604)
  Emscripten player update (openframeworks#7561)
  Improve ofGetEnv with default value. (openframeworks#7587)
  fix: ofLogError message typo (openframeworks#7599)
  Osc swap (openframeworks#7600)
  ofParameter: reinit mechanism: use setMethod() instead of set()  (openframeworks#7564)
  add of.entitlements to Examples/.gitignore (openframeworks#7583)
  bundle identifier fix (rfc1034 to allow spaces in names) (openframeworks#7597)
  WIP - more .h cleanup (openframeworks#7596)
  update pg submodule PG v.17 (openframeworks#7580)
  bugfix random_shuffle is removed in C++17 - replace with std::shuffle (openframeworks#7575)
  add setup argument to listen on specific ip (openframeworks#7574)
  Ubuntu : add make to packages to install (openframeworks#7571)
  projectGenerator update (openframeworks#7567)
  loadModel -> load (openframeworks#7566)

# Conflicts:
#	libs/openFrameworks/utils/ofXml.h
@artificiel artificiel deleted the artificiel-patch-reinit-setMethod branch September 12, 2023 15:00
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.

2 participants