From 48e277a095eaa96041bfb413870f2aaf07066bba Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Thu, 5 Apr 2012 02:45:45 +0000 Subject: [PATCH] Added swap method to Values --- gtsam/nonlinear/Values.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtsam/nonlinear/Values.h b/gtsam/nonlinear/Values.h index 57941ab27..b80348c01 100644 --- a/gtsam/nonlinear/Values.h +++ b/gtsam/nonlinear/Values.h @@ -393,6 +393,9 @@ namespace gtsam { /** Replace all keys and variables */ Values& operator=(const Values& rhs); + /** Swap the contents of two Values without copying data */ + void swap(Values& other) { values_.swap(other.values_); } + /** Remove all variables from the config */ void clear() { values_.clear(); }