mirror of
https://github.com/corda/corda.git
synced 2025-06-21 16:49:45 +00:00
fix backwards logic in System::Local assertions
This commit is contained in:
@ -352,8 +352,8 @@ class MySystem: public System {
|
|||||||
class Local: public System::Local {
|
class Local: public System::Local {
|
||||||
public:
|
public:
|
||||||
Local(System* s): s(s) {
|
Local(System* s): s(s) {
|
||||||
int r = pthread_key_create(&key, 0);
|
int r UNUSED = pthread_key_create(&key, 0);
|
||||||
assert(s, r);
|
assert(s, r == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void* get() {
|
virtual void* get() {
|
||||||
@ -361,13 +361,13 @@ class MySystem: public System {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void set(void* p) {
|
virtual void set(void* p) {
|
||||||
int r = pthread_setspecific(key, p);
|
int r UNUSED = pthread_setspecific(key, p);
|
||||||
assert(s, r);
|
assert(s, r == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void dispose() {
|
virtual void dispose() {
|
||||||
int r = pthread_key_delete(key);
|
int r UNUSED = pthread_key_delete(key);
|
||||||
assert(s, r);
|
assert(s, r == 0);
|
||||||
|
|
||||||
s->free(this);
|
s->free(this);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user