Mercurial > hg > orthanc-stone
diff Framework/Messages/IObserver.h @ 1262:ca2058bd74ef toa2020012702
Changed fingerprint from uuid_t to int64_t + poor man's
checksum (to fix emscripten syscall error + make it faster)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 27 Jan 2020 15:13:00 +0100 |
parents | f6be9412e42a |
children | 6e162d59e4f9 |
line wrap: on
line diff
--- a/Framework/Messages/IObserver.h Mon Jan 27 14:34:54 2020 +0100 +++ b/Framework/Messages/IObserver.h Mon Jan 27 15:13:00 2020 +0100 @@ -29,18 +29,20 @@ { private: MessageBroker& broker_; - // the following is a UUID that is used to disambiguate different observers - // that may have the same address - char fingerprint_[37]; + // the following is a int64_t with some checks that is used to + // disambiguate different observers that may have the same address + int64_t fingerprint_[3]; + + void AssignFingerprint(); public: IObserver(MessageBroker& broker); virtual ~IObserver(); - const char* GetFingerprint() const + int64_t GetFingerprint() const { - return fingerprint_; + return fingerprint_[0]; } bool DoesFingerprintLookGood() const;