git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fad7c9
)
Added ability to optionally transfer resetable value to a real var.
author
Maxim Mamontov
<faust.madf@gmail.com>
Wed, 9 Dec 2015 20:19:52 +0000
(22:19 +0200)
committer
Maxim Mamontov
<faust.madf@gmail.com>
Wed, 9 Dec 2015 20:31:25 +0000
(22:31 +0200)
include/stg/resetable.h
patch
|
blob
|
history
diff --git
a/include/stg/resetable.h
b/include/stg/resetable.h
index 8a6ad27c13584e04ca05c98caae867e97d18699a..a451b357326cd946c72b77ddf7b4bd57c65b1a36 100644
(file)
--- 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;