From: Maxim Mamontov Date: Wed, 9 Dec 2015 20:19:52 +0000 (+0200) Subject: Added ability to optionally transfer resetable value to a real var. X-Git-Tag: 2.409~174^2~11 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/1457086825e4251415b663bbce96089f8927ae28 Added ability to optionally transfer resetable value to a real var. --- 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;