[sim] SimDataValue: Fix cancellation

The uid was getting incremented by 1 during registration but not decremented
by 1 during cancellation, so cancellation didn't work correctly.

As the underlying registration ensures a non-zero result, don't increment
the result.
This commit is contained in:
Peter Johnson
2020-09-01 00:09:41 -07:00
parent 148eed3cdc
commit 7d6f09f5c7

View File

@@ -53,7 +53,7 @@ class SimDataValueBase : protected SimCallbackRegistryBase {
lock.unlock();
callback(name, param, &value);
}
return newUid + 1;
return newUid;
}
void DoSet(T value, const char* name) {