From 1457086825e4251415b663bbce96089f8927ae28 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Wed, 9 Dec 2015 22:19:52 +0200 Subject: [PATCH 1/1] Added ability to optionally transfer resetable value to a real var. --- include/stg/resetable.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/stg/resetable.h b/include/stg/resetable.h index 8a6ad27c..a451b357 100644 --- a/include/stg/resetable.h +++ b/include/stg/resetable.h @@ -50,6 +50,11 @@ public: is_set = true; } } + void maybeSet(value_type& dest) const + { + if (is_set) + dest = value; + } private: value_type value; -- 2.44.2