Page MenuHome

Depsgraph: introduce blender::deg namespace
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Mon, Jun 29, 12:26 PM.

Details

Summary

In files that define functions outside of the blender::deg namespace,
I added namespace deg = blender::deg to keep the code a bit more concise.

Diff Detail

Repository
rB Blender

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Mon, Jun 29, 12:26 PM
Jacques Lucke (JacquesLucke) created this revision.
  • update to latest master

Think it's fine.

Ideally would remove those annoying deg:: prefixed from C++ code, and refer anonymous C Depsgraph as ::Depsgraph this could be done later on.

This revision is now accepted and ready to land.Mon, Jun 29, 3:15 PM

Would you use using namespace blender::deg in the files that define the C api then?

I was also wondering whether we should use namespace blender::deg { instead of what we use now. (This works since C++17)

I'm not really fan of using namespace statements. C-API is quite tiny, can easing have using blender::deg::tag_id_recalc i.e.
In .cc files namespace alias is also fine, so your approach is still fine for C-API files.

The namespace blender::deg { vs. namespace blender { namespace deg { don't really have strong opinion.