Avoid use of global mutable state in mono_time on win32.#1135
Conversation
bd319e6 to
d16a3a7
Compare
Codecov Report
@@ Coverage Diff @@
## master #1135 +/- ##
========================================
- Coverage 82.8% 82.8% -0.1%
========================================
Files 82 82
Lines 14473 14479 +6
========================================
+ Hits 11991 11995 +4
- Misses 2482 2484 +2
Continue to review full report at Codecov.
|
|
The mutable_this trick is quite ugly, though I don't see that it could cause Also it's a shame to have Mono_Time as an argument to the callback, since So how about reverting to having current_time_monotonic_default be the Then if the const qualifier is dropped from the Mono_Time argument to |
6fce92a to
d306d82
Compare
|
I've kept the callback argument, so user defined callbacks can call mono_time functions, e.g. to reset the callback to its default, or set it to something else, at the end of the current callback's execution. PTAL. |
nurupo
left a comment
There was a problem hiding this comment.
Reviewed 10 of 10 files at r1.
Reviewable status:complete! 1 of 1 approvals obtained
b5ac288 to
444e19a
Compare
This uses a trick to get read-write access to `this` from a `const` member function, similar to C++ `mutable`, but uglier.
444e19a to
6872c14
Compare
This uses a trick to get read-write access to
thisfrom aconstmember function, similar to C++
mutable, but uglier.This change is