diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2018-09-04 13:35:36 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2018-09-04 13:35:36 -0500 |
| commit | e98e03566a28e47ce2245f7b6197801996df0014 (patch) | |
| tree | 276237b136723806819e1f729f3e1a99729c37b8 | |
| parent | ca4e477dc229043f3af5ac2c6039aab041921db1 (diff) | |
| parent | 7c8f95d3e22a63c5c990f518c4a90897d4adf4ce (diff) | |
| download | monzero-core-e98e03566a28e47ce2245f7b6197801996df0014.tar.gz monzero-core-e98e03566a28e47ce2245f7b6197801996df0014.tar.xz monzero-core-e98e03566a28e47ce2245f7b6197801996df0014.zip | |
Merge pull request #4271
7c8f95d ringct: make conversion functions return const refs (moneromooo-monero)
| -rw-r--r-- | src/ringct/rctTypes.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h index 452a68eb2..f6987d3f3 100644 --- a/src/ringct/rctTypes.h +++ b/src/ringct/rctTypes.h @@ -517,14 +517,14 @@ namespace rct { //int[64] to uint long long xmr_amount b2d(bits amountb); - static inline const rct::key pk2rct(const crypto::public_key &pk) { return (const rct::key&)pk; } - static inline const rct::key sk2rct(const crypto::secret_key &sk) { return (const rct::key&)sk; } - static inline const rct::key ki2rct(const crypto::key_image &ki) { return (const rct::key&)ki; } - static inline const rct::key hash2rct(const crypto::hash &h) { return (const rct::key&)h; } - static inline const crypto::public_key rct2pk(const rct::key &k) { return (const crypto::public_key&)k; } - static inline const crypto::secret_key rct2sk(const rct::key &k) { return (const crypto::secret_key&)k; } - static inline const crypto::key_image rct2ki(const rct::key &k) { return (const crypto::key_image&)k; } - static inline const crypto::hash rct2hash(const rct::key &k) { return (const crypto::hash&)k; } + static inline const rct::key &pk2rct(const crypto::public_key &pk) { return (const rct::key&)pk; } + static inline const rct::key &sk2rct(const crypto::secret_key &sk) { return (const rct::key&)sk; } + static inline const rct::key &ki2rct(const crypto::key_image &ki) { return (const rct::key&)ki; } + static inline const rct::key &hash2rct(const crypto::hash &h) { return (const rct::key&)h; } + static inline const crypto::public_key &rct2pk(const rct::key &k) { return (const crypto::public_key&)k; } + static inline const crypto::secret_key &rct2sk(const rct::key &k) { return (const crypto::secret_key&)k; } + static inline const crypto::key_image &rct2ki(const rct::key &k) { return (const crypto::key_image&)k; } + static inline const crypto::hash &rct2hash(const rct::key &k) { return (const crypto::hash&)k; } static inline bool operator==(const rct::key &k0, const crypto::public_key &k1) { return !crypto_verify_32(k0.bytes, (const unsigned char*)&k1); } static inline bool operator!=(const rct::key &k0, const crypto::public_key &k1) { return crypto_verify_32(k0.bytes, (const unsigned char*)&k1); } } |
