Closed jmmans closed 1 year ago
Suggest to remind the reader in a comment that key_t is an integer so this is a truncation/cast operation. The code here is technically correct, except that it's a little magical unless you know for sure how things are being done.
https://github.com/tomeichlersmith/G4DarkBreM/blob/c8a9ccf2018f84bd0a8f824f352b8ef2383b0c44/src/G4DarkBreM/ElementXsecCache.cxx#L34
Actually, key_t might be better called hash_t. It's behaving like a unique hash, though a reversible one....
Resolved with a9ff46b0ed267a971d690ec7c35e9bb23f358df4
Suggest to remind the reader in a comment that key_t is an integer so this is a truncation/cast operation. The code here is technically correct, except that it's a little magical unless you know for sure how things are being done.
https://github.com/tomeichlersmith/G4DarkBreM/blob/c8a9ccf2018f84bd0a8f824f352b8ef2383b0c44/src/G4DarkBreM/ElementXsecCache.cxx#L34
Actually, key_t might be better called hash_t. It's behaving like a unique hash, though a reversible one....