It is more efficient to pass the argument as const moveit_msgs::Constraints& constraints;
Also, it would be better if LinkConstraintMap was passed as an argument (LinkConstraintMap&), to prevent a copy on the stack. (Not sure if all compilers use move constructors yet)