X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d084d9ae9f7bcd7f7d1926e7eeae921dbad49273..e3703f791ff52f6d7a9d6f9e8dca37a506967c2b:/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;