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

10 Modified Paths:

/intern/cycles/blender/blender_camera.cpp (+1, -1) (Diff)
/intern/cycles/blender/blender_util.h (+1, -1) (Diff)
/intern/cycles/bvh/bvh_params.h (+4, -1) (Diff)
/intern/cycles/kernel/closure/alloc.h (+1, -1) (Diff)
/intern/cycles/kernel/osl/osl_services.cpp (+2, -2) (Diff)
/intern/cycles/kernel/osl/osl_shader.cpp (+1, -1) (Diff)
/intern/cycles/render/camera.cpp (+1, -1) (Diff)
/intern/cycles/render/scene.cpp (+2, -2) (Diff)
/intern/cycles/render/svm.cpp (+1, -1) (Diff)
/intern/cycles/util/util_vector.h (+4, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021