Blender Git Commit Log

Git Commits -> Revision b763c34

Revision b763c34 by Sergey Sharybin (master)
June 11, 2018, 11:02 (GMT)
Cycles: Cleanup, silence strict compiler warning

There is one legit place in the code where memcpy was used as an
optimization trick. Was needed for older version of GCC, but now
it should be re-evaluated and checked if it still helps to have
that trick.

In other places it's somewhat lazy programming to zero out all
object members. That is absolutely unsafe, at the moment when
less trivial class is used as a member in that object things
will break.

Other cases were using memcpy into an object which comes from
an external library. We don't control that object, and we can
not guarantee it will always be safe for such memory tricks
and debugging bugs caused by such low level access is far fun.

Ideally we need to use more proper C++, but needs to be done with
big care, including benchmarks of each change, For now do
annoying but simple cast to void*.

Commit Details:

Full Hash: b763c34e80d3b20f9a7f0a592e479e5fa7ab295f
Parent Commit: a6e5821
Lines Changed: +18, -13

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2018