diff --git a/gtsam/inference/VariableIndex.h b/gtsam/inference/VariableIndex.h index 0d7320428..f2ba3e31c 100644 --- a/gtsam/inference/VariableIndex.h +++ b/gtsam/inference/VariableIndex.h @@ -95,7 +95,7 @@ class GTSAM_EXPORT VariableIndex { } /// Return true if no factors associated with a variable - const bool empty(Key variable) const { + bool empty(Key variable) const { return (*this)[variable].empty(); }