X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/f7795445d9e0dd2282b336c89ebe117a2b71a88e..c34623ea91d2c8771889581b5457b4a9ec8256b4:/include/stg/resetable.h 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;