mdbx: fix MSVC warnings, add uint16-range-asserts.

Change-Id: Ie67a728035eeae250efbf962270b5c17c974db23
This commit is contained in:
Leonid Yuriev
2017-07-02 09:07:57 +03:00
committed by Leo Yuriev
parent 2ed74ee78f
commit 3e6a672286
9 changed files with 142 additions and 79 deletions

View File

@@ -241,20 +241,18 @@ bool testcase::wait4start() {
}
void testcase::kick_progress(bool active) const {
static chrono::time last;
chrono::time now = chrono::now_motonic();
if (active) {
static int last_point = -1;
int point = (now.fixedpoint >> 29) & 3;
if (point != last_point) {
last = now;
last.progress_timestamp = now;
fprintf(stderr, "%c\b", "-\\|/"[last_point = point]);
fflush(stderr);
}
} else if (now.fixedpoint - last.fixedpoint >
} else if (now.fixedpoint - last.progress_timestamp.fixedpoint >
chrono::from_seconds(2).fixedpoint) {
last = now;
last.progress_timestamp = now;
fprintf(stderr, "%c\b", "@*"[now.utc & 1]);
fflush(stderr);
}