X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/71d9db6cff1be807f6d010467b58efb95a6a61aa..ae8b02d528163c599a1238e1d14adc65ee847eea:/include/stg/resetable.h?ds=sidebyside 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;